2008/12/23 Rocky Bernstein <ro...@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. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com