Am 23.04.2009 um 05:28 schrieb Sujan Shakya:
> I need to ignore keyboard interrupts such as Ctrl-C, Ctrl-Z etc. There
> must a way to do this. So please help me.
import signal, os
# handle signal:
def handler(signum, frame):
print "don't eat yellow snow"
# Set the signal handler
signal.signal(signal.SIGINT, handler)
print "Press ctrl-c"
while True: pass
<http://docs.python.org/library/signal.html>
hth
Karsten
_______________________________________________
Urwid mailing list
[email protected]
http://lists.excess.org/mailman/listinfo/urwid