Catching a key press

thebjorn BjornSteinarFjeldPettersen at gmail.com
Mon Jul 23 05:27:49 EDT 2007


On Jul 23, 9:05 am, westymatt <westym... at gmail.com> wrote:
> This is without a gui toolkit.  This is going to be implemented on
> console i/o

If you're on windows, you'll need the kbhit() and getch() functions in
the msvcrt module. The up arrow returns two separate "keyboard-
hits" (with ordinal value 224 and 72).

-- bjorn




More information about the Python-list mailing list