readline() blocks after select() says there's data??

Erno Kuusela erno-news at erno.iki.fi
Sat Mar 16 21:17:24 EST 2002


In article <slrna95mv0.16c.grante at tuxtop.visi.com>, grante at visi.com
(Grant Edwards) writes:

| In article <a6tdvl$19mg$1 at nntp6.u.washington.edu>, Donn Cave wrote:
|| C I/O basically sucks for this application.  When you ask for 1024,
|| fread is bound to get that amount, just as it is if you ask for a
|| line via fgets ("readline".)  If you omit the amount, you're asking
|| for all the data, won't return until the socket's other end closes.

| Sorry, with all the talk of sockets, I was thinking of the recv() call.

you can use os.read() to get s.recv() like functionality for any
fd.

  -- erno



More information about the Python-list mailing list