Package question
Hans Nowak
ivnowa at hvision.nl
Mon Sep 25 10:46:59 EDT 2000
Bernhard Herzog wrote:
>
> Hans Nowak <ivnowa at hvision.nl> writes:
>
> > myprogram.py
> > MainPackage\
> > a.py
> > SubPackage1\
> > b.py
> > SubPackage2\
> > c.py
> >
> > In such cases, b.py cannot find a.py and thus it cannot use any
> > general modules in MainPackage. Neither can it see c.py in
> > SubPackage2.
>
> Just use
>
> import MainPackage.a
>
> and
> import MainPackage.SubPackage2.b
Yes, but that is exactly the problem... b.py cannot see MainPackage
either. Unless
I add it to sys.path, which I *don't* want to do. =(
More information about the Python-list
mailing list