Can't catch CTRL-C when SimpleXMLRPCServer running ?

Roland Koebler r.koebler at yahoo.de
Fri Feb 22 11:40:25 CET 2013


Hi,

> I would like to stop the script running in response to a CTRL-C.
how about "KeyboardInterrupt"?

try:
    ...
except KeyboardInterrupt:
    print "You pressed Ctrl+C"


Roland



More information about the Python-list mailing list