Hi all,
I have a script (to run at start-up) that listens for incoming IR pulses or button interrupts. Part of the code uses the Ctrl C keyboard interrupt to interrupt the listening and allow me to type messages into the program. I have tested this in idle with no problems, but when I make it run at boot (by editing /etc/rc.local ) the Ctrl C interrupt no longer works. Is there a way to create your own keyboard interrupt for, say, the Enter key?
The code is quite large, but the relevant bit looks like:
interrupt = False
while True:
try:
listen_for_IR()
if interrupt:
interrupt = False
* Do some stuff *
except KeyboardInterrupt:
interrupt = True
except:
print "error"
* Error handling*
Any thoughts?