I have a Python script client.py that is called when I start my server.py (I cannot change this).
I want the client.py script to interact with the user, i.e., ask for input and show output, but as the client.py script has been called by the server, I cannot interact with it via console.
I'd like to know what is the simplest approach to asking for input from the client.py script, given that I cannot input to STDIN. I imagine two different approaches:
- Using a GUI (like TKinter). But I would have to move all my script into a thread because the main loop of the GUI will want to be on the main thread.
- Using sockets and connecting either via terminal or webpage. But this feels like an overkill.
Is there any simpler option I'm not seeing?