import from containing folder

David Isaac aisaac0 at verizon.net
Wed Jul 26 11:06:59 EDT 2006


Suppose I have inherited the structure

PackageFolder/
      __init__.py
      mod1.py
      mod2.py
      SubPackageFolder/
              __init__.py
              mod3.py

and mod3.py should really use a function in mod2.py.
*Prior* to Python 2.5, what is the best way to access that?
(Please assume that "move it" is not the answer.)

Thanks,
Alan Isaac





More information about the Python-list mailing list