osdir.com


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


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.