Re: [Tutor] Question on os.popen

2014-01-19 Thread SM
> In the upper left corner of that page is a dropdown you can use to get to 3.3 for example. Thanks for that info. On Sun, Jan 19, 2014 at 11:42 PM, Dave Angel wrote: > SM Wrote in message: > > Sorry for not giving details on the OS and python version I am using: > Ubuntu and Python3 > > > O

Re: [Tutor] Question on os.popen

2014-01-19 Thread SM
Eryksun: Thanks for your reply. Yes, as I mentioned in my reply to Allen, I used subprocess.check_output and it worked for me. -SM On Sun, Jan 19, 2014 at 11:33 PM, eryksun wrote: > On Sun, Jan 19, 2014 at 6:36 PM, SM wrote: > > > > This time it probably ran for a few more iterations than befo

Re: [Tutor] Question on os.popen

2014-01-19 Thread Dave Angel
SM Wrote in message: > Sorry for not giving details on the OS and python version I am using: Ubuntu > and Python3 On Sun, Jan 19, 2014 at 8:20 PM, Alan Gauld 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 >

Re: [Tutor] Question on os.popen

2014-01-19 Thread eryksun
On Sun, Jan 19, 2014 at 6:36 PM, SM wrote: > > This time it probably ran for a few more iterations than before and stopped > with the same error message. This time it also output the following > messages: > > IOError: [Errno 4] Interrupted system call > Attribute not found in file (tsk_fs_attrlist

Re: [Tutor] Question on os.popen

2014-01-19 Thread SM
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 wor

Re: [Tutor] Question on os.popen

2014-01-19 Thread Alan Gauld
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

[Tutor] Question on os.popen

2014-01-19 Thread SM
Hello, I am using os.popen repeatedly to run Unix shell commands within my Python program. To be more specific, I am running in a loop which could iterate as many times as there are lines in an input file - in this example, close to 150 iterations. Each loop has two calls to os.popen. It works fine