readline() blocks after select() says there's data??
Grant Edwards
grante at visi.com
Sat Mar 16 00:38:52 EST 2002
In article <2b57f654.0203151009.296bb7da at posting.google.com>, wealthychef wrote:
> grante at visi.com (Grant Edwards) wrote in message news:<slrna92u5t.8oq.grante at tuxtop.visi.com>...
>> In article <2b57f654.0203141934.391d1bcc at posting.google.com>, wealthychef wrote:
>>
>> > selectables = [theProcess.childerr, theProcess.fromchild]
>> > (input, output, exc) = select.select([],selectables, selectables)
>>
>> It looks like you've got the first two parameters to select
>> reversed. After the above call, output is going to contain
>> writable sockets. If you're wanting to read data, you should
>> do:
>>
>> (output, input, exc) = select.select(selectables,[],selectables)
>
> Ding ding ding! You are correct, sir! Thanks for the help, I was
> doing it backwards. The python docs are a bit unclear to me on this
> point. Thanks for the help, it now works perfectly as expectorated.
Here's hint: Many of the Python libraries are just thin
wrappers around the standard OS library calls. Doing a "man
select" will get you more detailed information that may help
you understand the Python docs better. Sometimes not.
--
Grant Edwards grante Yow! HELLO, little boys!
at Gimme a MINT TULIP!! Let's
visi.com do the BOSSA NOVA!!
More information about the Python-list
mailing list