importing modules

Andi Albrecht albrecht.andi at googlemail.com
Fri May 7 07:19:03 EDT 2010


Richard Lamboj <richard.lamboj at bilcom.at> schrieb:
>
> Hello,
>
> I have a question about importing python modules.
>
> I have modul package, with submodules. So how can a  submodul access a modul 
> that is on level upper?
>
> Is there something like "import ../../blah"? I don't mean something like 
> this: "import bla.blub.moep"
>
> Kind Regards,
>
> Richi

Hi Richi,

starting with 2.5 Python allows relative imports, e.g. import ..blah

Andi



More information about the Python-list mailing list