In message , Roy Smith wrote:
> Consider, for example, a write on a TCP connection. You are sitting in
> a select(), when the other side closes the connection. The select()
> should return, and the write should then immediately fail.
Remember that select can return 3 different sets of file obje
John Nagle wrote:
> On 7/23/2010 1:45 AM, Thomas Guettler wrote:
>> Hi,
>>
>> I use non-blocking io to check for timeouts. Sometimes I get EAGAIN
>> (Resource temporarily unavailable)
>> on write(). My working code looks like this. But I am unsure how many
>>
- Original message -
> In article ,
> Kushal Kumaran wrote:
>
> > In general, after select has told you a descriptor is ready, the
> > first write after that should always succeed.
>
>
>
> Consider, for example, a write on a TCP connection. You are sitting in
> a select(), when the ot
On 7/23/2010 1:45 AM, Thomas Guettler wrote:
Hi,
I use non-blocking io to check for timeouts. Sometimes I get EAGAIN (Resource
temporarily unavailable)
on write(). My working code looks like this. But I am unsure how many bytes
have been written to the
pipe if I get an EAGAIN IOError.
At
In article ,
Kushal Kumaran wrote:
> In general, after select has told you a descriptor is ready, the
> first write after that should always succeed.
I used to think that too. Over the last few years, I've been
maintaining a large hunk of cross-platform C++ code which makes heavy
use of sel
On Fri, Jul 23, 2010 at 2:15 PM, Thomas Guettler wrote:
> Hi,
>
> I use non-blocking io to check for timeouts. Sometimes I get EAGAIN (Resource
> temporarily unavailable)
> on write(). My working code looks like this. But I am unsure how many bytes
> have been written to the
On Fri, 23 Jul 2010 10:45:32 +0200, Thomas Guettler wrote:
> I use non-blocking io to check for timeouts. Sometimes I get EAGAIN
> (Resource temporarily unavailable) on write(). My working code looks
> like this. But I am unsure how many bytes have been written to the pipe
> if I g
Hi,
I use non-blocking io to check for timeouts. Sometimes I get EAGAIN (Resource
temporarily unavailable)
on write(). My working code looks like this. But I am unsure how many bytes
have been written to the
pipe if I get an EAGAIN IOError. Up to now I retry with the same chunk.
If I get
"mp" wrote:
> Calling try3() yields the error:
> File "./test.py", line 54, in try3
> print os.read(fout.fileno(),256)
> OSError: [Errno 35] Resource temporarily unavailable
This means there is no data available- its actually working!
- Hendrik
--
http://mail.python.org/mailman/listin
In message <[EMAIL PROTECTED]>, mp
wrote:
> Calling try3() yields the error:
> File "./test.py", line 54, in try3
> print os.read(fout.fileno(),256)
> OSError: [Errno 35] Resource temporarily unavailable
That's what's supposed to happen. That's telling you there are no bytes
currently avail
I'm trying to use popen2 to call a program and then write and read
data from the program using a Python script. Unfortunately, my calls
to read block (I need non-blocking IO), and all the workarounds I've
seen online don't work. Here is my most promising solution and how it
bre
Marc Carter <[EMAIL PROTECTED]> writes:
> The problem with the above is that the subprocess buffers all its output
> when used like this and, hence, this automation is not informing me of
> much :)
You may want to take a look at my asyncproc module. With it, you
can start subprocesses and let
Donn Cave wrote:
> If you want to use select(), don't use the fileobject
> functions. Use os.read() to read data from the pipe's file
> descriptor (p.stdout.fileno().) This is how you avoid the
> buffering.
Thankyou, this works perfectly. I figured it would be something simple.
Marc
--
http://m
Marc Carter <[EMAIL PROTECTED]> wrote:
> import subprocess,select,sys
>
> speakers=[]
> lProc=[]
>
> for machine in ['box1','box2','box3']:
> p = subprocess.Popen( ('echo '+machine+';sleep 2;echo goodbye;sleep
> 2;echo cruel;sleep 2;echo world'), stdout=subprocess.PIPE,
> stderr=sub
In article <[EMAIL PROTECTED]>,
Marc Carter <[EMAIL PROTECTED]> wrote:
> I am trying to rewrite a PERL automation which started a "monitoring"
> application on many machines, via RSH, and then multiplexed their
> collective outputs to stdout.
>
> In production there are lots of these subprocess
I am trying to rewrite a PERL automation which started a "monitoring"
application on many machines, via RSH, and then multiplexed their
collective outputs to stdout.
In production there are lots of these subprocesses but here is a
simplified example what I have so far (python n00b alert!)
- SNI
16 matches
Mail list logo