import relative (with a directory)

Kay Schluehr kay.schluehr at
Sun Jan 11 06:32:34 CET 2009

On 11 Jan., 03:27, Chris Rebert <c... at> wrote:

> You should probably check out the relative import syntax introduced in
> PEP 328:
> It should be able to do exactly what you want.

This should exactly lead to exceptions in all of his demo code because
the modules are not "scripts" anymore but "modules in a package" - a
semantical difference I wasn't even aware of until relative imports
were introduced in Python 2.5.

I'd rather avoid the sour grapes and use absolute imports.


More information about the Python-list mailing list