A RetroSearch Logo

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

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2008-December/084570.html below:

[Python-Dev] Should there be a way or API for retrieving from a code object a loader method and package file where the code comes from?

[Python-Dev] Should there be a way or API for retrieving from a code object a loader method and package file where the code comes from? [Python-Dev] Should there be a way or API for retrieving from a code object a loader method and package file where the code comes from?Paul Moore p.f.moore at gmail.com
Tue Dec 23 15:06:31 CET 2008
2008/12/23 Rocky Bernstein <rocky at gnu.org>:
> Now that there is a package mechanism (are package mechanisms?) like
> zipimporter that bundle source code into a single file, should the
> notion of a "file" location should be adjusted to include the package
> and/or importer?

Check PEP 302 (http://www.python.org/dev/peps/pep-0302/) specifically
the get_source (optional) method. It's not exactly what you describe,
but it may help. Please note that it's optional - if you loaded the
code from a zipfile containing only bytecode files, there is no source
to get, so you have to be prepared for that case. But if the source is
available, this should give you a way of getting to it.

Paul.
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