Package organization: where to put 'common' modules?

fortepianissimo fortepianissimo at gmail.com
Sat Mar 4 00:36:11 EST 2006


Ok I guess a little more "hunch" might be needed to elicit suggestions.
If I chose to put foo in A, is there a way for code in B to import foo
from A? Namely, is there a way to import stuff from a parent
directory/package?

If it's not possible without changing sys.path, what's the path of
least effort - i.e., the way that requires least amount of added code
(adding code to prepend sys.path in every module under B certain does
the trick but requires a lot code).

Thanks!




More information about the Python-list mailing list