Py3: Import relative path module

Gnarlodious gnarlodious at
Sun Oct 31 16:06:05 CET 2010

I am loathe to duplicate programming in files that should just load a
copy from a module. I tried all kinds of tricks to import a module
from one level up. What's the secret?

It works if I say:

from Data import DumpHT

but ONLY if the search path in sys.path. I want a relative path import
independent from  sys.path.

How to? This is Python 3.1.1

-- Gnarlie

More information about the Python-list mailing list