select.select question

Heiko Wundram heikowu at ceosg.de
Fri Aug 23 16:26:45 EDT 2002


Am Fre, 2002-08-23 um 08.37 schrieb Donn Cave:
> select can see only data that's readable from the system level
> device (the socket, that is.)  Your data is in a file object, C
> library buffer in your process' space.  That's my guess.
> Python's select function cleverly supports rfile as an input, but
> it isn't so clever as to actually be able to tell you if rfile is
> readable;  rather, it can only tell you if rfile's device is readable.

Yep... I tried that out just now, and it works, when I put the rfile on
unbuffered. I had to switch to the lower level functions (recv) anyway,
as the file-object functions don't return a length in most (????)
cases... Sometimes they do, and it works, but most of the time it
doesn't work... Strange.

Well... Using recv and send directly is no backbreaking experience, as I
can then quite easily switch to using an ssl socket some time later.

Thanks!

	Heiko Wundram

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 196 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
URL: <http://mail.python.org/pipermail/python-list/attachments/20020823/3f26573d/attachment.sig>


More information about the Python-list mailing list