popen
March 10th, 2008 by webstersprodigy
Running shell commands and capturing input within python
This is something I have to do all the time.
something like:
import os
text = os.popen(‘ls’).read()
print text
will do it. Another handy tool is the os.system call.
This entry was posted
on Monday, March 10th, 2008 at 19:50 and is filed under Programming.
You can follow any responses to this entry through the RSS 2.0 feed.
You can leave a response, or trackback from your own site.