Re: Reading Live Output from a Subprocess

2012-04-06 Thread Nobody
On Fri, 06 Apr 2012 12:21:51 -0700, Dubslow wrote: > It's just a short test script written in python, so I have no idea how > to even control the buffering In Python, you can set the buffering when opening a file via the third argument to the open() function, but you can't change a stream's buffe

Re: Reading Live Output from a Subprocess

2012-04-06 Thread Frank Millman
"Dubslow" wrote: > It's just a short test script written in python, so I have no idea how to > even control the buffering (and even if I did, I still can't modify the > subprocess I need to use in my script). What confuses me then is why Perl > is able to get around this just fine without fak

Re: Reading Live Output from a Subprocess

2012-04-06 Thread John O'Hagan
On Fri, 6 Apr 2012 12:21:51 -0700 (PDT) Dubslow wrote: > On Friday, April 6, 2012 3:37:10 AM UTC-5, Nobody wrote: > > > In all probability, this is because the child process (pypy) is > > buffering its stdout, meaning that the data doesn't get passed to the OS > > until either the buffer is full

Re: Reading Live Output from a Subprocess

2012-04-06 Thread Vinay Sajip
On Apr 6, 7:57 am, buns...@gmail.com wrote: > I've heard that the Pexpect module works wonders, but the problem is that > relies on pty which is available in Unix only. Additionally, because I want > this script to be usable by others, any solution should be in the standard > library, which mea

Re: Reading Live Output from a Subprocess

2012-04-06 Thread Dubslow
On Friday, April 6, 2012 3:37:10 AM UTC-5, Nobody wrote: > In all probability, this is because the child process (pypy) is > buffering its stdout, meaning that the data doesn't get passed to the OS > until either the buffer is full or the process terminates. If it doesn't > get passed to the OS, t

Re: Reading Live Output from a Subprocess

2012-04-06 Thread shi
Maybe this can help you? http://technogems.blogspot.com/2012/01/capture-colored-console-output-in.html -- http://mail.python.org/mailman/listinfo/python-list

Re: Reading Live Output from a Subprocess

2012-04-06 Thread Nobody
On Thu, 05 Apr 2012 23:57:49 -0700, bunslow wrote: > Okay, I've been trying for days to figure this out, posting on forums, > Googling, whatever. I have yet to find a solution that has worked for me. > (I'm using Python 3.2.2, Ubuntu 11.04.) Everything I've tried has led to > buffered output being

Re: Reading Live Output from a Subprocess

2012-04-06 Thread Chris Rebert
On Thu, Apr 5, 2012 at 11:57 PM, wrote: > Okay, I've been trying for days to figure this out, posting on forums, > Googling, whatever. I have yet to find a solution that has worked for me. > (I'm using Python 3.2.2, Ubuntu 11.04.) Everything I've tried has led to > buffered output being spat b