Hi Alan, Thanks for your reply. My answer to why I am using os.popen could be a lame one - I have used it extensively in various places before and it has been working well and so was hung up on using it. Now I replaced it by subprocess.check_output with appropriate parameters and it seems to be working. Does that mean this is one of the limitations of os.popen? I am not sure. Sorry for not giving details on the OS and python version I am using: Ubuntu and Python3. Thanks, SM
On Sun, Jan 19, 2014 at 8:20 PM, Alan Gauld <alan.ga...@btinternet.com>wrote: > 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 > > _______________________________________________ > Tutor maillist - Tutor@python.org > To unsubscribe or change subscription options: > https://mail.python.org/mailman/listinfo/tutor >
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: https://mail.python.org/mailman/listinfo/tutor