[Python-Dev] Another approach for the import mechanism

Skip Montanaro skip@pobox.com
Thu, 5 Dec 2002 16:09:34 -0600


    Gustavo> Having one of:

    Gustavo> /some/dir/httplib/__init__.zip
    Gustavo> /some/dir/httplib.zip

    Gustavo> You'd do:

    Gustavo> sys.path.insert(0, "/some/dir")

Remember, a zip file looks like a directory because of its embedded
structure.  If you had httplib.zip it would have to contain at least one .py
or .so (or .pyd or ...) file.  I think you would insert
/some/dir/httplib.zip into sys.path.

-- 
Skip Montanaro - skip@pobox.com
http://www.mojam.com/
http://www.musi-cal.com/