I have a small CLI app, with some "print" and "input" commands. I want to turn it into a basic GUI app (ideally with a windows .exe and a linux executable). This GUI app should display the text output (from print) in a window, and start a new window that prompts the user for some text (with an "enter" button) each time instead of running the usual "input" command.
I can see how I can do that in tkinter: define a new function "myinput" and use it instead of input everywhere. (The output will also require threads as there are delays in the functions and I don't want to wait for the end of the function to start displaying some text).
But I'm wondering if this hasn't been solved in a much better way by some other module. It seems like redefining input, or intercepting it's calls somehow, should be doable. Does this kind of "GUI-fy" command or module exist?
Note that a module that draws a console in a tkinter window then properly emulate the console just for that program would already be pretty good, thought not quite as nice as having pop-up windows for input; but again, I've seen some online python interpreters (like https://console.basthon.fr/) do a pop-up window just for inputs, so together with a drawn console this would be enough.