Curses & Keypress
ale.of.ginger at gmail.com
ale.of.ginger at gmail.com
Thu Nov 10 21:43:18 EST 2005
Now that I have gotoxy() down for moving the cursor around, I want that
to be a result of keypresses (namely from the numpad -- 7 = NorthWest,
8 = North, 9 = NE, etc...). I have little clue how to do this. After
searching google, I've come upon this; include:
import curses
in the header. However, I've found various methods of actually reading
the keyboard press (getch(), raw_input, etc.). What is the best method
to use for reading keypress, so I can have something like:
if (keypressvariable == 'numpad7'):
WConio.gotoxy(x-1,y+1)
etc...
Thanks.
More information about the Python-list
mailing list