"Paul Boddie" <[EMAIL PROTECTED]> wrote:
> Fredrik Lundh wrote:
> > Paul Boddie wrote:
> >
> > > This is one of the more reliable methods since upon receiving a packet
> > > "delimiter" the receiver knows that the data is complete.
> >
> > and for people who want RELIABLE and not just "at least
Fredrik Lundh wrote:
> Paul Boddie wrote:
>
> > This is one of the more reliable methods since upon receiving a packet
> > "delimiter" the receiver knows that the data is complete.
>
> and for people who want RELIABLE and not just "at least
> not entirely unreliable", there's always:
>
> http:
Paul Boddie wrote:
> This is one of the more reliable methods since upon receiving a packet
> "delimiter" the receiver knows that the data is complete.
and for people who want RELIABLE and not just "at least
not entirely unreliable", there's always:
http://cr.yp.to/proto/netstrings.txt
(i
Hendrik van Rooyen wrote:
> "Giovanni Bajo" <[EMAIL PROTECTED]>
> >
> > Yeah, but WHY was the API designed like this? Why can't I read and write
> > freely from a pipe connected to a process as many times as I want?
>
> you can - all you have to do is to somehow separate the "records" - else how
>
"Giovanni Bajo" <[EMAIL PROTECTED]>
> Fredrik Lundh wrote:
>
> >> No matter what I do I cant get the following code to do what I expect.
> >> I hadn't used subprocess t o read and write to pipes of a
> >> still-running app, and I just can't seem to get it right. What gives?
> >>
> >> import subpro
At Thursday 7/12/2006 12:16, El Pitonero wrote:
Is there something equivalent to the "-u" option for a shell like
"bash"? In general (whether the subprocess is bash or python), how can
one make sure that once something is written into the subprocess'
stdin, the output from its stdout is fully co
Giovanni Bajo wrote:
>>> assert p.stdout.readline() == '10\n'
>
> Yeah, but WHY was the API designed like this? Why can't I read and write
> freely from a pipe connected to a process as many times as I want?
the subprocess module is designed to deal with Unix-style subprocesses
in general, not
Paul Boddie wrote:
> Shane Hathaway wrote:
> >
> > Make sure the pipes are unbuffered. Launch the process with "python -u"
> > and flush() the streams after writing. (That's the issue I've
> > encountered when doing this before.)
>
> The -u option is critical, yes. I wrote some code recently whic
Shane Hathaway wrote:
>
> Make sure the pipes are unbuffered. Launch the process with "python -u"
> and flush() the streams after writing. (That's the issue I've
> encountered when doing this before.)
The -u option is critical, yes. I wrote some code recently which
communicated with a subprocess
Fredrik Lundh wrote:
>> No matter what I do I cant get the following code to do what I expect.
>> I hadn't used subprocess t o read and write to pipes of a
>> still-running app, and I just can't seem to get it right. What gives?
>>
>> import subprocess
>>
>> p = subprocess.Popen("python", stdout=s
Calvin Spealman <[EMAIL PROTECTED]> wrote:
> No matter what I do I cant get the following code to do what I expect.
> I hadn't used subprocess t o read and write to pipes of a
> still-running app, and I just can't seem to get it right. What gives?
>
> import subprocess
>
> p = subprocess.Pop
Calvin Spealman wrote:
> No matter what I do I cant get the following code to do what I expect.
> I hadn't used subprocess t o read and write to pipes of a
> still-running app, and I just can't seem to get it right. What gives?
>
> import subprocess
>
> p = subprocess.Popen("python", stdout=subpr
On 12/5/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote:
> Calvin Spealman wrote:
>
> > No matter what I do I cant get the following code to do what I expect.
> > I hadn't used subprocess t o read and write to pipes of a
> > still-running app, and I just can't seem to get it right. What gives?
> >
> >
Calvin Spealman wrote:
> No matter what I do I cant get the following code to do what I expect.
> I hadn't used subprocess t o read and write to pipes of a
> still-running app, and I just can't seem to get it right. What gives?
>
> import subprocess
>
> p = subprocess.Popen("python", stdout=subp
No matter what I do I cant get the following code to do what I expect.
I hadn't used subprocess t o read and write to pipes of a
still-running app, and I just can't seem to get it right. What gives?
import subprocess
p = subprocess.Popen("python", stdout=subprocess.PIPE, stdin=subprocess.PIPE)
p.
15 matches
Mail list logo