Why doesn't Python include non-blocking keyboard input function?
Marko Rauhamaa
marko at pacujo.net
Thu Oct 27 01:49:31 EDT 2016
Terry Reedy <tjreedy at udel.edu>:
> On 10/26/2016 8:33 AM, Marko Rauhamaa wrote:
>> Maybe there should be some way to get the raw events from the PTY.
>
> PTY? Must be Linux-specific. Most beginners are not on Linux.
A PTY is an emulated console (<URL:
https://en.wikipedia.org/wiki/Pseudoterminal>). I don't know Windows but
I would guess cmd.exe does something similar there.
Also, I have no statistics on most beginning programmers operating
systems.
>> But what would be wrong in a GUI PTY API? No windowing,
>
> 'No windowing'? Python normally runs in a text widget in a window,
> programmed to emulate a dumb terminal.
Must be Windows-specific.
> I never touched an Apple II and only briefly a Commodore 64, so either
> never knew or have forgotten the Basic commands they had. But it should
> be possible to emulate at least the text screen of either with
> tkinter.
Everything is possible for an individual application (like Python). The
TTY/PTY interface enhancement I was entertaining would be a new API
provided by the OS to all programs.
Marko
More information about the Python-list
mailing list