If your main file is in the root of the project, you can just use absolute imports. So you can use gui.anotherwindow or project.important from all files.
I'm not sure this is good practice though... I was first under the impression that you can always import modules that are in your current working dir. But this seems to not always work... Almar 2008/11/11 Jeremiah Dodds <[EMAIL PROTECTED]>: > > > On Tue, Nov 11, 2008 at 7:08 AM, Markus Mayer <[EMAIL PROTECTED]> wrote: >> >> Steve Holden schrieb: >> > 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 >> > > > Are explicit relative imports applicable here? Could he do a > > from .. import project.main as main > > without adding another __init__.py? > > Or do I have my head screwed on funny? > > -- > http://mail.python.org/mailman/listinfo/python-list > > -- http://mail.python.org/mailman/listinfo/python-list