how do I listen on a socket without sucking up all the CPU time?
Andrew Markebo
andrew.markebo at telelogic.com
Wed Oct 4 07:15:03 EDT 2000
|
| select.select worked great, but now I've got other problems, namely
| figureing out why I'm no longer catching the KeyboardInterrupt exception I
| used to be able to catch.
Could it be something like ctrl-c isn't taken care of until you reach
the python code again??
So instead of doing 'x,y,z=select(x,y,z, verylongtime)' do:
while something:
x,y,z=select(x,y,z, medium)
if x:
read
Could be a problem determining when x is closed or so on..
another thought.. you don't happen to have a try with a blank except
somewhere up the stack??
/andy
More information about the Python-list
mailing list