Win32 KeyboardInterrupt
Chris Withers
chrisw at nipltd.com
Wed Mar 1 08:33:41 EST 2000
Got part of the way there...
Turns out the worker class was blocking on a socket.accept(). As soon as I
telnetted to the listening port, the worker shut down...
Any way I can make socket.accept() not do this?
cheers,
Chris
Chris Withers wrote:
>
> Hi,
>
> I'm trying to use the followingcode to trap a keyboard interrupt:
>
> try:
> if __name__ =='__main__': Worker(sys.argv)
> except KeyboardInterrupt:
> print "Saving state..."
>
> It works fine under linux but under Windows NT 4.0:
> If I press ctrl-c, nothing happens,
> If I press ctrl-break, I get dumpen to the command prompt by the state saving
> doesn't get executed...
>
> Any ideas?
>
> Chris
>
> PS: The KeyboardInterrupt key on Win32 is ctrl-c, right? ;-)
>
> --
> http://www.python.org/mailman/listinfo/python-list
More information about the Python-list
mailing list