[Python-Dev] how to easily consume just the parts of eggs that are good for you

Greg Ewing greg.ewing at canterbury.ac.nz
Thu Apr 10 01:58:53 CEST 2008

Phillip J. Eby wrote:
> Are you using Python 2.5?  As of 2.5, the linecache module should 
> correctly read the source line from the present location of the source 
> file the module was loaded from, regardless of the file name specified 
> in the traceback.

I think it was doing that, but I was trying to find the file,
and the traceback wasn't helping.

> A better fix would be for Python to use relative paths in co_filename, 
> as this would fix similar problems that occur whenever you move 
> .pyc/.pyo files around.

Yes, it must be possible to do something better. The actual path
is known when the module is loaded, so it should just be a matter
of storing it somewhere appropriate.


More information about the Python-Dev mailing list