On Jun 4, 9:56 am, Dennis Lee Bieber <[EMAIL PROTECTED]> wrote:
> On Tue, 3 Jun 2008 23:48:38 -0700 (PDT), [EMAIL PROTECTED] declaimed the
> following in comp.lang.python:
>
> > Is there way to configure the stdout buffer size so that it flushes
> > earlier..
> > Is there a way to make above mentioned piece code working?
>
>         I believe there is a command line argument that will set Python into
> an unbuffered mode... BUT, unless the spawned process/program has some
> similar option, you have no control over its output.

Which is why the Cookbook recipe I pointed to in my other message
appears to be a superior alternative. Its author works around this
problem by subclassing Popen to use non blocking I/O.

I used it to drive ClearCase's cleartool interactive tool and it works
very well. The only problem I encountered is that it doesn't mix well
with framework that have their own event loop (wxPython in my case),
but you can't really expect that to work.

Cheers,
Nicola Musatti
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to