[Python-Dev] module extension search order - can it be changed?
Bill Bumgarner
bbum@codefab.com
Tue, 25 Feb 2003 15:18:51 -0500
On Tuesday, Feb 25, 2003, at 15:04 US/Eastern,
python-dev-request@python.org wrote:
> python23.zip is good for end users of programs written in Python, but
> not so good for Python programmers: AFAIK it won't show source lines
> in tracebacks for modules loaded from the zip file.
Speaking entirely from a point of ignorance, why are the source line #s
not shown for frames that are implemented in modules loaded from
zipimport?
Assuming the ZIP archive could be exactly identical to what one might
find in /usr/lib/python2.3/, the zip could contain all the py + pyc as
found in the normal library?
As such, it would be trivial for the developer to unzip the zip into--
for example-- /tmp/ for reference purposes. Assuming the developer
has a copy of the 2.3 source lying around and has the zip with just the
PYC, the lines numbers are still very useful.
All things considered, I would think it would be highly desirable for
the developer's Python development environment to be as much like a
stock deployment environment as possible. Java made a grave mistake
in this regard -- the whole class loader mechanism can cause massive
problems-- very annoying and hard to debug problems-- when moving code
from a development environment into deployment if the class loader that
loads a particular class changes between the two environments.
b.bum