Nick Coghlan <ncogh...@gmail.com> wrote:
> Henning von Bargen wrote:
>> The solution is so obvious:
>> 
>> Why not use a .pyr file that is internally a zip file?

I think a Zip file might be the right approach too.  Either you
could have directories in the zip file for each version, e.g.

    2.7/foo.pyc
    3.3/foo.pyc
    2.7/bar.pyc
    3.3/bar.pyc

Or a Zip directory for each module:

    foo/2.7.pyc
    foo/3.3.pyc

I think you could get away without funky names because dot would
always be in the version number.

This would be implemented simply as an extension to the zip import
mechanism we already have.  Using the zip format would allow people
to use existing zip utilities to manipulate them.

> Agreed this should be discussed in the PEP, but one obvious problem is
> the speed impact. Picking up a file from a subdirectory is going to
> introduce less overhead than unpacking it from a zipfile.

I'm pretty sure it would be better than using directories.  A
directory for every module is not performance friendly.  Really, our
current module per file is not performance friendly.

Zip files could use "store" as the compression method if you are
really worried about CPU time.

  Neil

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to