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 vstinner
Recipients vstinner
Date 2008-09-26.16:26:50
SpamBayes Score 2.59444e-10
Marked as misclassified No
Message-id <>
Here is a new version of _Py_DisplaySourceLine() using 
PyTokenizer_FindEncoding() to read the coding header, and 
PyFile_FromFd() to create an "unicode-awake" file. The code could be 
optimized, but it least it displays correctly the file line ;-)

The code is based on the original _Py_DisplaySourceLine() and 
call_find_module() (import.c).

* The code is young and new, it might be delayed until python 3.1
* Some functions may raise new exceptions (eg. MemoryError). I don't 
know how Python will react if an exception is raised during 
PyTraceBack_Print() ?
* The return code is 0 for success, but is it -1 or 1 for an error? It 
looks like error is "result != 0", so both -1 and 1 should be valid. I 
used -1.
Date User Action Args
2008-09-26 16:26:52vstinnersetrecipients: + vstinner
2008-09-26 16:26:52vstinnersetmessageid: <>
2008-09-26 16:26:51vstinnerlinkissue3975 messages
2008-09-26 16:26:51vstinnercreate