python classes/file structure

codecraig codecraig at gmail.com
Thu Apr 21 09:48:44 EDT 2005


What is the best/common way to structure ur python code for an
application?

For example...if I create some custom GUI widgets I have this

C:\stuff
    --> gui
        --: MyCustomWidget.py
    --: TestWidgets.py

so MyCustomWidget.py has one class, class MyCustomWidget: ...

so from TestWidgets.py i have to do this

from gui import *

widget = gui.MyCustomWidget.MyCustomWidge()

...seems weird, how should I structure this?  Is it not common to have
one class in a .py?

thanks




More information about the Python-list mailing list