[Bf-python] Py_CompileString() issues
Ken Hughes
khughes at pacific.edu
Sun Sep 11 06:45:39 CEST 2005
I decided to take a break from tpgetset stuff for a while and try to
figure out why sometimes the messages printed to the console by the
built-in exception handler often show the wrong line (right line NUMBER,
but wrong line CONTENTS) when the script is run with ALT-P.
I tracked the problem down to Py_CompileString() in the RunPython()
function; it's passed the filename of the script. When PyErr_Print() is
called on to process an exception, it reads the line with the error from
the file. If the script in the text window has been changed, then the
line printed can be incorrect.
Ken
More information about the Bf-python
mailing list