Re: determine if os.system() is done

2005-09-08 Thread Christos Georgiou
On Wed, 07 Sep 2005 23:28:13 -0400, rumours say that Peter Hansen <[EMAIL PROTECTED]> might have written: >Martin P. Hellwig wrote: >> The only thing I am disappointed at his writing style, most likely he >> has a disrupted view on social acceptable behavior and communication. >> These skills mig

Re: determine if os.system() is done

2005-09-08 Thread Martin Franklin
Xah Lee wrote: > suppose i'm calling two system processes, one to unzip, and one to > “tail” to get the las t line. How can i determine when the first > process is done? > > Example: > > subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]); > > last_line=subprocess.Popen([r"/usr/bin/tail",

Re: determine if os.system() is done

2005-09-07 Thread Martin P. Hellwig
Peter Hansen wrote: > Martin P. Hellwig wrote: > >> The only thing I am disappointed at his writing style, most likely he >> has a disrupted view on social acceptable behavior and communication. >> These skills might be still in development, so perhaps it is >> reasonable to give him a chance an

Re: determine if os.system() is done

2005-09-07 Thread Xah Lee
Thanks all. I found the answer, rather easily. To make a system call and wait for it, do: subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]).wait(); -- this post is archived at: http://xahlee.org/perl-python/system_calls.html Xah [EMAIL PROTECTED] ∑ http://xahlee.org/ Xah Lee wr

Re: determine if os.system() is done

2005-09-07 Thread Peter Hansen
Martin P. Hellwig wrote: > The only thing I am disappointed at his writing style, most likely he > has a disrupted view on social acceptable behavior and communication. > These skills might be still in development, so perhaps it is reasonable > to give him a chance and wait until he is out of his

Re: determine if os.system() is done

2005-09-07 Thread Martin P. Hellwig
Lars Gustäbel wrote: > [Fredrik Lundh] > >>han har försökt, men hans tourette tog överhanden: > > > IMHO it's more likely an Asperger's syndrome. > > http://en.wikipedia.org/wiki/Asperger_Syndrome > I disagree, in his writings I found no evidence of autisme. Actually most of it can be classif

Re: determine if os.system() is done

2005-09-07 Thread Steve Horsley
Xah Lee wrote: > suppose i'm calling two system processes, one to unzip, and one to > “tail” to get the last line. How can i determine when the first > process is done? > > Example: > > subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]); > > last_line=subprocess.Popen([r"/usr/bin/tail","

Re: determine if os.system() is done

2005-09-07 Thread Lars Gustäbel
[Fredrik Lundh] > han har försökt, men hans tourette tog överhanden: IMHO it's more likely an Asperger's syndrome. http://en.wikipedia.org/wiki/Asperger_Syndrome -- Lars Gustäbel [EMAIL PROTECTED] Any sufficiently advanced technology is indistinguishable from magic. (Arthur C. Clarke) -- http

Re: determine if os.system() is done

2005-09-07 Thread Fredrik Lundh
"Nainto" <[EMAIL PROTECTED]> wrote: > Yeah, I agree. The Python documentation just merey describes what > arguements a function can take not as much how to use the actual > function. yeah, that's a really relevant criticism when we're talking about a module that contains one function and one class

Re: determine if os.system() is done

2005-09-07 Thread Nainto
Yeah, I agree. The Python documentation just merey describes what arguements a function can take not as much how to use the actual function. -- http://mail.python.org/mailman/listinfo/python-list

Re: determine if os.system() is done

2005-09-07 Thread Martin Franklin
Xah Lee wrote: > suppose i'm calling two system processes, one to unzip, and one to > “tail” to get the last line. How can i determine when the first > process is done? > > Example: > > subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]); > > last_line=subprocess.Popen([r"/usr/bin/tail","

Re: determine if os.system() is done

2005-09-07 Thread Jeremy Jones
Thomas Bellman wrote: >"Xah Lee" <[EMAIL PROTECTED]> writes: > > > >>suppose i'm calling two system processes, one to unzip, and one to >>tail to get the last line. How can i determine when the first >>process is done? >> >> > > > >>Example: >> >> > > > >>subprocess.Popen([r"/sw/bin/

Re: determine if os.system() is done

2005-09-07 Thread Fredrik Lundh
Thomas Bellman wrote: > Have you tried reading the manual for the subprocess module? han har försökt, men hans tourette tog överhanden: http://mail.python.org/pipermail/python-list/2005-September/297642.html -- http://mail.python.org/mailman/listinfo/python-list

Re: determine if os.system() is done

2005-09-07 Thread Thomas Bellman
"Xah Lee" <[EMAIL PROTECTED]> writes: > suppose i'm calling two system processes, one to unzip, and one to > tail to get the last line. How can i determine when the first > process is done? > Example: > subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]); > last_line=subprocess.Popen([r"

Re: determine if os.system() is done

2005-09-07 Thread Alessandro Bottoni
Xah Lee wrote: > of course, i can try workarounds something like os.system("gzip -d > thiss.gz && tail thiss"), but i wish to know if there's non-hack way to > determine when a system process is done. Well, if you use a function of the "popen" family, you get some kind of return value from the su

determine if os.system() is done

2005-09-07 Thread Xah Lee
suppose i'm calling two system processes, one to unzip, and one to “tail” to get the last line. How can i determine when the first process is done? Example: subprocess.Popen([r"/sw/bin/gzip","-d","access_log.4.gz"]); last_line=subprocess.Popen([r"/usr/bin/tail","-n 1","access_log.4"], stdout=sub