Feasibility of console based (non-Gui) Tkinter app which can accept keypresses?

Michael Torrie torriem at gmail.com
Wed Jul 11 11:46:40 EDT 2018

On 07/11/2018 08:09 AM, jkn wrote:
> So I am looking for confirmation of this, and/or whether there is any way of
> running a Tkinter application in 'console' mode, running a main loop and> both outputting data and accepting, and acting on, key presses.

So far as I know, no this isn't possible, especially on any Unix system
where Tk is getting events from the graphical windowing system, which
doesn't exist in a console.  NCurses is the usual go-to library for
console applications that need to get keyboard events.

More information about the Python-list mailing list