[Python-au] import stuff from parent directory

Daryl Tester Daryl.Tester at iocane.com.au
Fri Dec 23 05:27:37 CET 2005


Mike Dewhirst wrote:

> How do I 'import ../prog'?

What you asked for, but probably not what you want:

import sys
sys.path.insert(0, '..')

import prog

Merry Christmas!


-- 
Regards,
  Daryl Tester, IOCANE Pty. Ltd.



More information about the python-au mailing list