[Tutor] No Need to Press Enter

Alan Gauld alan.gauld at freenet.co.uk
Mon May 9 22:37:50 CEST 2005


> yes. That's exactly what I was looking for. Do you know the code for
> the  ^Q  ^Z (control + letter keys) to quit? Like  ^Z to quit the
Python shell?

Be careful with that one. The ^Z only works on Windows. On Linux or
MacOS
its ^D. In both cases its the end of file character used by the
operating
system, so you should check for eof not a specific character if you
want
to use the native quit command.

To find out what any particular key emits try using the program in my
"event Driven Programming" topic in my tutor., it should print out the
key codes for any key...

Alan G
Author of the Learn to Program web tutor
http://www.freenetpages.co.uk/hp/alan.gauld



More information about the Tutor mailing list