A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2015-February/138302.html below:

[Python-Dev] PEP 441 - Improving Python ZIP Application Support

[Python-Dev] PEP 441 - Improving Python ZIP Application Support [Python-Dev] PEP 441 - Improving Python ZIP Application SupportSerhiy Storchaka storchaka at gmail.com
Sun Feb 15 17:00:36 CET 2015
On 15.02.15 10:47, Paul Moore wrote:
> On 15 February 2015 at 08:14, Paul Moore <p.f.moore at gmail.com> wrote:
>> Maybe it would be better to
>> put something on PyPI and let it develop outside the stdlib first?
>
> The only place where a ".pyz" file can't easily be manipulated with
> the stdlib zipfile module is in writing a shebang line to the start of
> the archive (i.e. adding "prefix" bytes before the start of the
> zipfile data). It would be nice if the ZipFile class supported this
> (because to do it properly you need access to the file object that the
> ZipFile object wraps). Would it be reasonable to add methods to the
> ZipFile class to read and write the prefix data?

But the stdlib zipfile module supports this.

with open(filename, 'wb') as f:
     f.write(shebang)
     with zipfile.PyZipFile(f, 'a') as zf:
         ...


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4