How can I handle the char immediately after its input, without waiting an endline?
Duncan Booth
duncan.booth at invalid.invalid
Sun Oct 26 05:23:41 EDT 2008
Lie Ryan <lie.1296 at gmail.com> wrote:
> And as far as I know, it is impossible to implement a "press any key"
> feature with python in a simple way (as it should be).
"press any key" is a misfeature at the best of times. Quite apart from the
people who can't find the key with 'any' written on it there are also the
people who can't figure out why it 'Ctrl', 'Alt', 'Shift', 'Caps Lock'
aren't keys (not to mention the smartass's who think Ctrl+Break is a key).
It is better to always ask for a specific key.
Have you tried Google? Googling for "python getch" gives
http://snippets.dzone.com/posts/show/915 as the first hit.
More information about the Python-list
mailing list