[Python-Dev] importlib is now bootstrapped (and what that means) (original) (raw)
Brett Cannon brett at python.org
Mon Apr 16 18:40:42 CEST 2012
- Previous message: [Python-Dev] importlib is now bootstrapped (and what that means)
- Next message: [Python-Dev] importlib is now bootstrapped (and what that means)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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/freezeimportlib.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?
-Brett
Regards Antoine.
Python-Dev mailing list Python-Dev at python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/brett%40python.org -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20120416/c7f047eb/attachment.html>
- Previous message: [Python-Dev] importlib is now bootstrapped (and what that means)
- Next message: [Python-Dev] importlib is now bootstrapped (and what that means)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]