Select in Python
fredrik at pythonware.com
Tue Jun 27 08:17:34 CEST 2006
> from sys import stdin
> from select import select
> while 1:
> (rr, wr, er) = select([stdin], , )
> for fd in rr:
> print fd
> program block in the first select(), after I type something and "enter
> ", it never block in select() again,why?
if there's data waiting to be read from the stream, select() will tell
you so every time you ask.
More information about the Python-list