Help need with subprocess communicate

rdabane at gmail.com rdabane at gmail.com
Wed Jun 4 02:48:38 EDT 2008


On Jun 3, 11:23 pm, Dennis Lee Bieber <wlfr... at ix.netcom.com> wrote:
> On Tue, 3 Jun 2008 18:04:40 -0700 (PDT), rdab... at gmail.com declaimed the
> following in comp.lang.python:
>
>
>
> > Hi Daniel,
> > Thanks for your reply..
> > I've done exactly as you suggested...but I'm still having problem with
> > the read...it just gets stuck in
> > the read ( I think because its a blocking read...)
>
>         And it is likely blocking because the subprocess is doing buffered
> output -- ie, nothing is available to be read because the output has not
> been flushed.
>
>         This is a problem with most programs when run as a subprocess -- it
> is common for stdout, when routed to a pipe or file, to behave as a
> buffered stream that only flushes when some x-bytes have been written;
> unlike stdout to a console which gets flushed on each new-line.
> --
>         Wulfraed        Dennis Lee Bieber               KD6MOG
>         wlfr... at ix.netcom.com              wulfr... at bestiaria.com
>                 HTTP://wlfraed.home.netcom.com/
>         (Bestiaria Support Staff:               web-a... at bestiaria.com)
>                 HTTP://www.bestiaria.com/


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?



More information about the Python-list mailing list