how to structure a directory with many scripts and shared code

Steven D'Aprano steve at
Tue Feb 16 00:05:39 CET 2010

On Mon, 15 Feb 2010 16:29:05 +0100, Benedict Verheyen wrote:

> However, when i make a subdirectory, for example database and put a
> script in there, how would i import logutils or mailtutils from within
> the database subdirectory? This fails:
>     from tools.logutils import logger

Sounds like you need to ensure that the top level directory needs to be 
added to your PYTHONPATH.

Do you need instructions to do this?


More information about the Python-list mailing list