Re: Running a command line program and reading the result as it runs

2013-08-24 Thread Ian Simcock
Peter Otten wrote: Ian Simcock wrote: Greetings all. I'm using Python 2.7 under Windows and am trying to run a command line program and process the programs output as it is running. A number of web searches have indicated that the following code would work. import subprocess p

Re: Running a command line program and reading the result as it runs

2013-08-23 Thread Ian Simcock
Chris Angelico wrote: On Fri, Aug 23, 2013 at 1:26 AM, Ian Simcock ian.simc...@internode.on.net wrote: Chris Angelico wrote: A lot of programs, when their output is not going to the console, will buffer output. It's more efficient for many purposes. With Unix utilities, there's often

Re: Running a command line program and reading the result as it runs

2013-08-23 Thread Ian Simcock
Rob Wolfe wrote: Ian Simcock ian.simc...@internode.on.net writes: When file object is used in a for loop it works like an iterator and then it uses a hidden read-ahead buffer. It might cause this kind of blocking. You can read more details here (description of method ``next``): http

Re: Running a command line program and reading the result as it runs

2013-08-22 Thread Ian Simcock
in one rapid go. Can you think of anything else I can look at? Ian Simcock. -- http://mail.python.org/mailman/listinfo/python-list

Running a command line program and reading the result as it runs

2013-08-21 Thread Ian Simcock
it blocking? Thanks, Ian Simcock. -- http://mail.python.org/mailman/listinfo/python-list