[Python-Dev] importlib is now bootstrapped (and what that means)
brett at python.org
Mon Apr 16 18:40:42 CEST 2012
On Mon, Apr 16, 2012 at 12:31, Antoine Pitrou <solipsis at pitrou.net> wrote:
> On Mon, 16 Apr 2012 12:15:16 -0400
> "R. David Murray" <rdmurray at bitdance.com> wrote:
> > I don't see how depending on Cython is better than depending on having
> > an existing Python. If the only benefit is semi-readable code, surely
> > we do have source code for the pre-frozen module, and it is just a matter
> > of convincing hg that the bytecode is binary, not text?
> > Brett's earlier thought of compiling from source as a *fallback* makes
> > sense to me. I'd rather not add overhead to startup that we can avoid.
In reply to David, one trick with this, though, is that frozen modules
don't store the magic number of the bytecode, so that would need to change
in order to make this fully feasible.
> Compiling from source at which point, though?
At startup of the interpreter.
> In essence, that would mean reimplement Python/freeze_importlib.py in C?
> We could even compile it to a separate executable that gets built
> before the Python executable (like pgen) :-)
So a mini Python that just knew how to compile to bytecode and nothing more?
> Python-Dev mailing list
> Python-Dev at python.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-Dev