I currently have code that basically runs an infinite while loop to collect data from users. Constantly updating dictionaries/lists based on the contents of a text file. For reference:
You can try wrapping that code in a try/except block, because keyboard interrupts are just exceptions:
try: while True: IDs2=UpdatePoints(value,IDs2) time.sleep(10) except KeyboardInterrupt: print 'interrupted!'
Then you can exit the loop with CTRL-C.