I'm trying to catch the keyboard interrupt caused Ctr-C on stdin of WiPy, and for instance ignore it. I have a few lines of code that seem to work:
Code: Select all
try:
ch = sys.stdin.read(1)
except KeyboardInterrupt:
pass
Alternatively: Which socket(stream is stdin connected to?
Regards