I need tips for projecting a python server without blocking GUI
In general, I need some learning material about how to program softwares composed of various parts: how to put everything together and working great while keeping it encapsulated.
My specific case is: I'm trying to program a simple group messenger in python, for learning purposes. It will have a GUI that gives access to hosting your own server or joining one. The code I actually have done is a simple echo server and client, and a simple GUI window with a chat box, entry box and user list, each one working independently as a python package.
The actual problem is how to put the server, the client and the GUI working together smoothly, without the socket "access()" blocking the GUI updates. Probably threads will be necessary, but I don't know how to add it in this context.
Thanks in advance!
What you want is a main event loop.
What I would suggest in terms of resources is having a look at the Tornado source code and figure out what they are doing. You will be writing something very similar except you will be waiting on GUI events as well.