Package question

Bernhard Herzog herzog at online.de
Mon Sep 25 09:24:58 EDT 2000


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


-- 
Bernhard Herzog   | Sketch, a drawing program for Unix
herzog at online.de  | http://sketch.sourceforge.net/



More information about the Python-list mailing list