On 9/4/2017 5:50 PM, Rick Johnson wrote:
Terry Reedy wrote:
[...]
In IDLE, trackbacks *do* include source lines.
>>> def f():
return 1/0
>>> f()
Traceback (most recent call last):
File "<pyshell#2>", line 1, in <module>
f()
File "<pyshell#1>", line 2, in f
return 1/0
ZeroDivisionError: division by zero
One of the few things that IDLE did better than Python,
which is much more informative than:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "<stdin>", line 2, in f
ZeroDivisionError: division by zero
I think newbies would find IDLE's explicit messaging to be
more intuitive compared to standard Python. Counting lines
is never any fun, and even if you're only dealing with a
few, it's both annoying and inefficient.
When i'm away from an editor (like IDLE, for instance), one
of the features i miss most is the ability to right click
the line of the exception message (you know, the one that
includes the offending line number and offending script
filepath), and choose "open script for editing" from a
contextual menu, which will open the script and
automatically scroll down to the offending line for me.
Ahhh, efficient bliss.
'Goto file/line' also works on the grep/find-in-files Output Window. I
must have used this about 30 times in 8 outputs tonight try to track
down bugs in a proposed IDLE patch. There were no tracebacks, just
thinkgs not working.
I plan to make it a bit faster by moving the option to the top of the
menu. I have thought about making it even faster by not having to use
the context menu -- just click, or maybe double click, and the jump
happens. What do you think?
--
Terry Jan Reedy
--
https://mail.python.org/mailman/listinfo/python-list