wxPython Conventions

Jared Russell douceur at gmail.com
Tue Jan 31 00:14:27 EST 2006


I've recently decided to try my hand at GUI programming with wxPython,
and I've got a couple questions about the general conventions regarding
it.

To mess around with it, I decided to create a small app to check my
Gmail.  I want something that will just sit in my system tray checking
for new emails every ten minutes or so.  As such, I have no need for an
actual window anywhere.  So I'm wondering if I should still use a Frame
or not.  From playing around with it, it seems it's unnecessary, but
I'm admittedly unfamiliar with what would be considered proper.

My other question involved the proper location of specific functions.
Take for instance the functions meant for logging in and actually
checking for new email.  Would it be better to put them in my App
class, my Frame class (if the answer to the above question is that yes,
I should use a Frame regardless), or in an entirely separate class?  To
me, it seems most natural to put them in the App class, but I'm not
sure if it would be better to avoid clutter and stick them somewhere
else.  And if I would stick them in some other class, where should I
keep the reference to the instance of that class?  In my App or Frame?

Like I said, I'm just beginning my experience with wxPython, so any
help would be appreciated.  I've looked through all the demos and
searched the group, but nothing else seems to pertain to my specific
questions.

Jared




More information about the Python-list mailing list