How to import a package

sashan sashang at nospam.ihug.co.nz
Fri Dec 6 20:19:09 EST 2002


Hi

I'm struggling to import a package. My file structure is laid out like this:

./AppDir
    __init__.py
    App.py
    /SomePackage
        __init__.py
        Package1.py

And in my script App.py:

from SomePackage import *

however this doesn't work? why not?
I've tried adding the absolute path of the AppDir sys.path (i.e. 
sys.path.append(e:/code/AppDir)) but it doesn't help

Thanks

-- 
sashan
-------------------------------
P: Egad! You astound me, Brain!
B: That's a simple task, Pinky.




More information about the Python-list mailing list