Seeking advice on GUI code architecture

Qp qp at al.net
Sun Mar 14 22:29:08 EST 2004


Hi, I've got a generic coding architecture question about an application I'm
developing.  Given that I've never developed anything quite like this before
(especially not in Python), I'd appreciate any pointers that you can give
me.

The app is a network client written using Twisted and Tkinter.  The clients
will connect to a server, communicate via public & private chat, and also
play simple games.

My problem is this:  how do you keep your GUI code seperate from as much
underlying code as possible?  As I begin, I find myself adding a lot of
intermediate code (not Tkinter, but not Twisted either) to the GUI class,
and it's beginning to clutter things up.  It really seems as if I should
have a GUI class, a network class, and some separate way of communicating
between them... but I can't seem to visualize the structure in my mind.

If anyone has tips, docs, or examples, I would greatly appreciate it.

Thanks a lot.






More information about the Python-list mailing list