As an example, let's say you have a main module at /usr/code/Main.py
and you have a module you'd like to import at /usr/code/util/Util.py,
you can do this:

import util.Util

If you are using PyDev and Eclipse to develop your Python code, you can
set the base directory to reference module imports from.

You can also tweak your PYTHONPATH if you want to import modules from
other directory structures.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to