On 04/01/12 18:28, brandon w wrote:
How do I capture a key like the <Space> bar or the <Enter> key?

It depends on your OS.

For Windows use msvcrt and the getch() function.

For other OS your best bet is curses.

See the "Event Handling" topic in my tutorial for examples
using both.

There is a terminal module that tries to hide the differences.
There is also a 3rd party module tat offers more functionality on Windows.

--
Alan G
Author of the Learn to Program web site
http://www.alan-g.me.uk/

_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to