How can I handle the char immediately after its input, without waiting an endline?

Lie Ryan lie.1296 at gmail.com
Sun Oct 26 07:57:48 EDT 2008


On Sun, 26 Oct 2008 09:23:41 +0000, Duncan Booth wrote:

> 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.

I know about those jokes. And it's the reason why I mentioned that (the 
serious point is about getting one-char input for "command-line GUI" 
applications like curse-based apps that is too simple to include the 
whole curse).




More information about the Python-list mailing list