[Twisted-Python] Win32 fix for twisted/internet/tcp.py
joe at neosource.com.au
Fri Jun 23 11:12:57 EDT 2006
I just downloaded the twisted words package, and tried the ircLogBot.py sample.
It came up with an error on my Win32 box, but worked fine on my linux box.
The error on win32 was due to the following line 512 in twisted/internet/tcp.py:
r, w, e = select.select(, , [self.fileno()], 0.0)
The select module on Win32 doesn't accept empty read/write handles, so it generated an 'invalid argument' exception.
I changed line 512 to the following, and the sample now works on win32.
r, w, e = select.select([self.fileno()], [self.fileno()], [self.fileno()], 0.0)
P.S: I used Twisted 2.4.0 and twisted words 0.3.0
Hope you find my report useful, even if win32 bugs aren't a priority ;)
More information about the Twisted-Python