Project layout / Import files from different subdirectories
Steve Holden
steve at holdenweb.com
Tue Nov 11 06:37:58 EST 2008
Markus Mayer wrote:
> Diez B. Roggisch schrieb:
>> By placing a __init__.py into project, and then
>>
>> import project.main
>> import project.gui.mainwindow
>>
>>
>> Diez
>
> Ouch. Thanks.
>
If you want shorter names in your main code, of course, you can use
import project.main as main
import project.gui.mainwindow as window
or somethihg similar.
regards
Steve
--
Steve Holden +1 571 484 6266 +1 800 494 3119
Holden Web LLC http://www.holdenweb.com/
More information about the Python-list
mailing list