Message79117
I just had the same problem in a call to inspect.findsource()
(actually my code calls inspect.stack() which calls ... which calls
findsource()). The code object passed to findsource() had a filename
of "database/__init__.py" which is the correct filename relative to
sys.path, so in this case a simple fix would have worked: delete line
82 of linecache.py
82 basename = os.path.split(filename)[1]
and use filename instead of basename for the rest of the function. (Or
for a quick hack, change line 82 to just "basename = filename")
I'm using Python 2.5.2 but the relevant code in linecache.py also
exists in 3.0 (just checked). |
|
Date |
User |
Action |
Args |
2009-01-05 09:59:44 | diazona | set | recipients:
+ diazona, gvanrossum, theller, exarkun, ndim, RafeSacks |
2009-01-05 09:59:44 | diazona | set | messageid: <1231149584.25.0.411687340361.issue1309567@psf.upfronthosting.co.za> |
2009-01-05 09:59:43 | diazona | link | issue1309567 messages |
2009-01-05 09:59:43 | diazona | create | |
|