On 6/30/2021 5:30 PM, Pablo Galindo Salgado wrote:
Also, notice we are extending the traceback module (in Python) to support this, so you probably can also leverage those changes so you don't need to mess with code objects yourself :)
IDLE currently uses traceback.extract_tb and traceback.print_list. In between, it a) removes extra entries at both ends that result from running in IDLE, and b) adds code lines for shell entries. It does this in the user code execution process and send the resulting string tagged as stderr via the socket connection to the IDLE gui process.
What I believe I would like is to have 'line n' of each frame entry replaced with a position 4-tuple, however formatted, and no caret line. IDLE would then use the position to tag the appropriate slice of the line.
Currently, if the user right clicks on either of the two lines of pair, to see the line in its context in its file, IDLE opens the file in an editor if not open already and tags the entire line. If 'line n' were replaced with the slice info, it could instead tag that slice, either within a line or spanning multiple lines. Both would be improvements.
Please add me as nosy to any appropriate issues/PRs so I have at least an opportunity to test and comment.
-- Terry Jan Reedy _______________________________________________ Python-Dev mailing list -- python-dev@python.org To unsubscribe send an email to python-dev-le...@python.org https://mail.python.org/mailman3/lists/python-dev.python.org/ Message archived at https://mail.python.org/archives/list/python-dev@python.org/message/E5NSLCFQBR6M27YZQHRXRQKO657O5GF4/ Code of Conduct: http://python.org/psf/codeofconduct/