what is the Best way to define classes in wxpython

Many factors determine how you break your code down into "classes" and
modules. Subclass a widget if the behavior is unque or working with
native widgets need customization.

Native widgets? Yes, most operating systems like the MSWindows
operating system has a set of built in widgets. Like the StatusBar.
The native MSW StatusBar widget for Windows XP does not support
background color changes (I think). But subclassing it and not using
the native StatusBar allows you to code your widget to change
background colors.

Check out the wxPython Demo. There is a good example ofhow to
modularize your application.

Another factor; how do you want to package or distribute your app. A
one file app may be big, but it is sure easy to install.

How many other coders are there? More modules means worse bug creep
but better parallel development efforts.

Do you plan to use your custom widgets in future projects? If yes
split your modules more.

Again a factor; what editing tools do you like to use? I love
Notepad++ with the exception that it only allows TWO panes in one
instance; meaning I can only view just two seperate areas of one file
at a time. So I tend to break the files down some to allow multiple
sections to be seen in seperate running instances of Notepad++.
Multiple Notepad++ instances have issues with saving and loading
"sessions". This pushes me to keep the Python files to be not too
small either.

Having lots of little modules with one or two classes in them will add
code bloat just by all the imports and added namespace prefixes too.
Learning about __init__.py and packaging tricks helps alleviate that a
little.