<div dir="ltr"><br><br><div class="gmail_quote"><div dir="ltr">On Sat, 14 Apr 2018 at 17:01 Neil Schemenauer <<a href="mailto:nas-python-ideas@arctrix.com">nas-python-ideas@arctrix.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 2018-04-12, M.-A. Lemburg wrote:<br>
> This leaves the proposal to restructure pyc files into a sectioned<br>
> file and possibly indexed file to make access to (lazily) loaded<br>
> parts faster.<br>
<br>
I would like to see a format can hold one or more modules in a<br>
single file.  Something like the zip format but optimized for fast<br>
interpreter startup time.  It should support lazy loading of module<br>
parts (e.g. maybe my lazy bytecode execution idea[1]).  Obviously a<br>
lot of details to work out.<br></blockquote><div><br></div><div>Eric Snow, Barry Warsaw, and I chatted about a custom file format for holding Python source (and data files). My notes on the chat can be found at <a href="https://notebooks.azure.com/Brett/libraries/design-ideas/html/Python%20source%20archive%20file%20format.ipynb">https://notebooks.azure.com/Brett/libraries/design-ideas/html/Python%20source%20archive%20file%20format.ipynb</a> . (And since we aren't trying to rewrite bytecode we figured it wouldn't break your proposal, Neil ;) .<br><br></div><div>-Brett<br></div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
The design should also take into account the widespread use of<br>
virtual environments.  So, it should be easy and space efficient to<br>
build virtual environments using this format (e.g. maybe allow<br>
overlays so that stdlib package is not copied into virtual<br>
environment, virtual packages would be overlaid on stdlib file).<br>
Also, should be easy to bundle all modules into a "uber" package and<br>
append it to the Python executable.  CPython should provide<br>
out-of-box support for single-file executables.<br>
<br>
<br>
1. <a href="https://github.com/python/cpython/pull/6194" rel="noreferrer" target="_blank">https://github.com/python/cpython/pull/6194</a><br>
_______________________________________________<br>
Python-ideas mailing list<br>
<a href="mailto:Python-ideas@python.org" target="_blank">Python-ideas@python.org</a><br>
<a href="https://mail.python.org/mailman/listinfo/python-ideas" rel="noreferrer" target="_blank">https://mail.python.org/mailman/listinfo/python-ideas</a><br>
Code of Conduct: <a href="http://python.org/psf/codeofconduct/" rel="noreferrer" target="_blank">http://python.org/psf/codeofconduct/</a><br>
</blockquote></div></div>