[Python-Dev] Inconsistent behaviour in import/zipimport hooks
Bill Janssen
janssen at parc.com
Thu Nov 10 05:00:44 CET 2005
> This should work on a few platforms:
> env PYTHONPATH=FILE.zip python -m some_module_in_the_zip
Yeah, that's not bad, but I hate setting PYTHONPATH. I was thinking
more along the line of
python -z ZIPFILE
where python would look at the ZIPFILE to see if there's a top-level
module called "__init__", and if so, load it. That would allow
existing PYTHONPATH settings to still be used if the user cares.
Bill
More information about the Python-Dev
mailing list