Posted By

fnurl on 04/26/09


Tagged


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

denver320


Get output from os command in Python


 / Published in: Python
 

URL: http://docs.python.org/library/subprocess.html

  1. from subprocess import Popen
  2. from subprocess import PIPE
  3.  
  4. bla = Popen(["ls", "-l"], stdout=PIPE).communicate()[0]

Report this snippet  

You need to login to post a comment.