Project layout / Import files from different subdirectories

Almar Klein almar.klein at gmail.com
Tue Nov 11 10:32:05 EST 2008


> It works when the program you are executing is in the current working
> directory, because Python always puts the directory containing the
> program you are executing (not the current working directory) on the path.

Aha, that makes sense.
I also found with a quick test that importing a module from the current dir
works because '' is part of sys.path. I'm again amazed how beautifull it is
all put together :)

Cheers,
  Almar



More information about the Python-list mailing list