>>>>> Gabriel Rossetti <[EMAIL PROTECTED]> (GR) wrote:

>GR> not a stupid question, I think that may be it. I tried setting PYTHONPATH
>GR> like Sam suggested and it worked, but I was unable to do it programmically.
>GR> I tried putting it in the __init__.py file like a web post suggested but it
>GR> wasn't run until after I set PYTHONPATH, and once that was done there is no
>GR> need (that I can see anyways) to set it in __init__.py.

The __init__.py is executed during your import statement, thus it is too
late to find MyPackage. You will have to change the sys.path before the
import, e.g. in your main program. Or do what is usually done: put
MyPackage in the site-packages directory.
-- 
Piet van Oostrum <[EMAIL PROTECTED]>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: [EMAIL PROTECTED]
-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to