I want to know if it's possible to catch a Control-C in python in the following manner:
if input != contr-c:
#DO THINGS
else:
#quit
I've read up on stuff with try
and except KeyboardInterrupt
but they're not working for me.
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…