Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6525

Re: How to catch a line with Popen

References <irr69j$6c1$1@speranza.aioe.org> <gd13u695qlqop8c7r53kg3sf12tgtolspm@4ax.com> <irt5k2$h7v$1@speranza.aioe.org>
Date 2011-05-29 03:26 -0700
Subject Re: How to catch a line with Popen
From Chris Rebert <clp2@rebertia.com>
Newsgroups comp.lang.python
Message-ID <mailman.2219.1306664812.9059.python-list@python.org> (permalink)

Show all headers | View raw


On Sun, May 29, 2011 at 3:02 AM, TheSaint <nobody@nowhere.net.no> wrote:
> Tim Roberts wrote:
>
>> Are you specifying a buffer size in the Popen command?  If not, then the
>> Python side of things is unbuffered
>
> The buffer is as per default. The program reports one line around 1/2 second
> time.
> I think I'll look into the option as Nobody states:
>
>        p = subprocess.Popen(...)
>        for line in p.stdout:
>            ...
>        p.wait()
>
> It is strange that would take a for cycle, rather than catching the line on-
> the-fly. I can judge it now, I'm going to try it out.

What do you mean by "on-the-fly" in this context?

Cheers,
Chris

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

How to catch a line with Popen TheSaint <nobody@nowhere.net.no> - 2011-05-29 00:01 +0800
  Re: How to catch a line with Popen Nobody <nobody@nowhere.com> - 2011-05-28 23:15 +0100
  Re: How to catch a line with Popen Tim Roberts <timr@probo.com> - 2011-05-28 16:32 -0700
    Re: How to catch a line with Popen TheSaint <nobody@nowhere.net.no> - 2011-05-29 18:02 +0800
      Re: How to catch a line with Popen Chris Rebert <clp2@rebertia.com> - 2011-05-29 03:26 -0700
        Re: How to catch a line with Popen TheSaint <nobody@nowhere.net.no> - 2011-05-29 21:52 +0800
          Re: How to catch a line with Popen TheSaint <nobody@nowhere.net.no> - 2011-05-29 22:13 +0800
          Re: How to catch a line with Popen Chris Torek <nospam@torek.net> - 2011-05-30 01:02 +0000
            Re: How to catch a line with Popen TheSaint <nobody@nowhere.net.no> - 2011-05-30 23:29 +0800
              Re: How to catch a line with Popen Chris Torek <nospam@torek.net> - 2011-05-30 21:33 +0000
                Re: How to catch a line with Popen TheSaint <nobody@nowhere.net.no> - 2011-05-31 19:33 +0800

csiph-web