This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author diazona
Recipients RafeSacks, diazona, exarkun, gvanrossum, ndim, theller
Date 2009-01-05.09:59:43
SpamBayes Score 0.013132697
Marked as misclassified No
Message-id <1231149584.25.0.411687340361.issue1309567@psf.upfronthosting.co.za>
In-reply-to
Content
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).
History
Date User Action Args
2009-01-05 09:59:44diazonasetrecipients: + diazona, gvanrossum, theller, exarkun, ndim, RafeSacks
2009-01-05 09:59:44diazonasetmessageid: <1231149584.25.0.411687340361.issue1309567@psf.upfronthosting.co.za>
2009-01-05 09:59:43diazonalinkissue1309567 messages
2009-01-05 09:59:43diazonacreate