I am a python noob and was wondering how to "listen" for a keystroke. In other words, I want a program to run, but when I press a key (a regular key, not Ctrl-C or Ctrl-Break), I want the program to stop. I would like to implement this in a try..except structure.

If anyone has a code fragment to illustrate, please include that also.

Thanks...