Relative Imports, why the hell is it so hard?

CinnamonDonkey CinnamonDonkey at
Mon Mar 23 15:16:30 CET 2009

Hi All,

I'm fairly new to Python so I still have a lot to learn. But I'd like
to know how to correectly use relative imports.

Please, please... please! don't go off on rants about why you think
relative imports should not be used. I've got 15+ years in C++ and
relative inclusion of other sections of code has never been a problem.
As far as I am concerned what I am trying to do is perfectly
reasonable and valid.

Thank you in advance to everyone who helps solve this, because I just
don't get it.


\ App
|   |
|   |
|   |
|   |

Module1 needs to access functionality in Module2.
from ..subpack2 import module2

Seems reasonable to me... but it just does not work and I was so
liking Python. :(

More information about the Python-list mailing list