Package question
Hans Nowak
ivnowa at hvision.nl
Tue Sep 26 04:35:35 EDT 2000
On 26 Sep 00, at 10:44, Delaney, Timothy wrote:
> You need an __init__.py in each package ...
>
> myprogram.py
> MainPackage\
> __init__.py
> a.py
> SubPackage1\
> __init__.py
> b.py
> SubPackage2\
> __init__.py
> c.py
I know, but I was merely simplifying things... Anyway, I have some kind of
a solution now... when I start myprogram.py, packages can see each other
through MainPackage... and if I want to test a separate module, like b.py,
then I can easily add a directory to sys.path in the test suite. A way to
reference packages that are in higher directories would still be nice, but
it's not necessary.
Blessed be,
--Hans Nowak (zephyrfalcon at hvision.nl)
More information about the Python-list
mailing list