In the main shell of IDLE, errors always return a line number but the development environment doesn't even have line numbers. Is there anyway to turn on line numbers?
To show line numbers in the current window, go to Options
and click Show Line Numbers
.
To show them automatically, go to Options
> Configure IDLE
> General
and check the Show line numbers in new windows
box.
Unfortunately there is not an option to display line numbers in IDLE although there is an enhancement request open for this.
However, there are a couple of ways to work around this:
Under the edit menu there is a go to line option (there is a default shortcut of Alt+G for this).
There is a display at the bottom right which tells you your current line number / position on the line: