Python Forum

Full Version: Combining gui main loops, repls and networking
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
What I aim to do, at first as an exercise, is write a simple app server. I wish to be able to connect over a socket and send commands, talking to a simple repl, or a python interpreter. Now backdoor and eventlets appear to suffice for the socket interface. But how do I integrate this and the gtk main loop? Essentially I need a main loop which will cooperatively multitask between these.

I'd like things to be python as much as possible, and using a gui toolkit that works with Wayland. (Doing the same using Qt is equally interesting.)

Does anybody have some good ideas?

More generally, I'd like a means to run an interactive python session where one can create gui elements and have them work without blocking the repl. This possibly means having a separate thread in C running the gui. At present I just wish to explore the possibilities