[Python-Dev] PEP 273: Import Modules from Zip Archives

Greg Ward gward@python.net
Wed, 31 Oct 2001 14:14:10 -0500


On 31 October 2001, James C. Ahlstrom said:
> Did we decide to allow import of *.py?

Here's an idea that would apply to importing *.py whether inside ZIP
files or not: if unable to write the .pyc, write a warning to stderr.
That'll be useful to people who inadvertently put .py files without .pyc
in a ZIP file, and to people who try to import .py files from a
directory they can't write to, etc.  Now that Python has a warning
framework, warnings like
  unable to write /usr/lib/python2.2/site-packages/foo.pyc: permission denied
or
  unable to write /usr/lib/python2.2/site-packages/foo.zip/foo.pyc:
    can't write to ZIP file

sound like useful warnings.

        Greg
-- 
Greg Ward - programmer-at-large                         gward@python.net
http://starship.python.net/~gward/
Save energy: be apathetic.