Select on Win XP
noah at noah.org
Sat Mar 20 02:33:24 CET 2004
shifflett at nps.navy.mil (D. Shifflett) wrote in message news:<da4423a8.0403111444.5d96247f at posting.google.com>...
> Hi all,
> I am trying to run a Python program
> on my Win XP box, that I brought over from a Linux box.
> select() doesn't return until I have sent a packet
> even though I am using a short timeout (1 second)
> ilist = 
> print "readerthread - my_sock %d" % my_sock.fileno()
> while not self._stopevent.isSet():
> print "about to select"
> il,ol,el = select(ilist,,,1)
One thing you might try this for your ilist:
In theory it shouldn't matter.
The socket docs say that socket.fileno() is useful for working with select.
It's confusing since docs for select.select() say you can pass in a list
of an objects supporting fileno() or you can pass integer filedescriptors, so
why would socket.fileno() says it's useful for working with select.select()?
I don't know, but comeing from a C background using select, I would eliminate
any confusion and just use select with an integer list.
Let me know if that helps at all.
More information about the Python-list