[Tutor] Question on os.popen
Alan Gauld
alan.gauld at btinternet.com
Mon Jan 20 02:20:20 CET 2014
On 19/01/14 23:36, SM wrote:
> I read about os.popen in
> http://docs.python.org/2/library/subprocess.html#subprocess.Popen
This doesn't answer the question but I'm curious.
If you read about os.popen in the subprocess module docs why did
you use it? The subprocess module replaces all the os.popen calls
with the generally superior subprocess.Popen class.
Now, I don't know if using subprocess instead of os would fix
things in this case but it seems an odd choice? I'm curious why
you chose to go with os.popen?
BTW you don't tell us which OS you are using (or which Python
version), that may be pertinent to the answer. I'm assuming
it's some variant of *nix but which one?
--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/
http://www.flickr.com/photos/alangauldphotos
More information about the Tutor
mailing list