Why doesn't Python include non-blocking keyboard input function?

Chris Angelico rosuav at gmail.com
Tue Oct 25 18:58:51 EDT 2016


On Wed, Oct 26, 2016 at 9:30 AM, BartC <bc at freeuk.com> wrote:
>> That still doesn't answer the fundamental question:
>>
>> Are you looking for KEYBOARD input or TEXT input?
>
>
> Does it matter that much?
>
> Because even if you opt for TEXT, the input (when interactive which is what
> we're talking about) is usually chopped up into LINE events. What's the
> difference if we want to concentrate on CHAR or KEY events instead?

Yes, it does. Text does not include "Home" or "Delete", but it does
include all manner of symbols that aren't on everyone's keyboards. It
makes a huge difference.

Of course, you might want to stick your head in the sand and pretend
that every character has a button on your keyboard.

ChrisA



More information about the Python-list mailing list