creating package question

erick_bodine at comcast.net erick_bodine at comcast.net
Wed Nov 16 14:30:18 EST 2005


I have a package directory structure as follows

root-
    |
    Common (contains __init__.py file)
    WindowsComponents (contains __init__.py file)
    ...

I would like modules in the WindowsComponents directory to be able to
import some modules from the Common directory.  In my first pass, I was
able to append sys.path ( sys.path.append('../Common') ) in each module
that wants to import from Common, but this feels "clunky".  Is there a
"standard"/"best" way to accomplish this?  

--ERick




More information about the Python-list mailing list