Idle line number setting and linenumbers modification

1. The most important idea came from the boss, but he made a mistake with one of the images. The Settings should have been modified in the config-Extensions.def but his image was changed to config-keys.def.
2.LineNumbers. Py file is downloaded from Baidu Experience
This is a dividing line between the two.
One, we can’t just use Daniel’s stuff, probably because they’re using a different version of Python than ours. I used the 3.7 version of Python. There was no Confighandler. py in lib, only config. py.
If you’re using version 3.7, you can just copy the following code instead of the first few lines of

from idlelib.config import idleConf
from idlelib.delegator import Delegator
from idlelib.percolator import Percolator

First, make sure works
Generally there will be errors, basically can not find “model”,
the main reason is the case or file name problem, you can go to a similar file to see how the file is named, modify it can be solved.
4. Configure the Idle plug-in

File path\to\your\python\ idlelib\config-extensions.def
# add to bottom
linenumbers-show=< Control-Key-space>

Five, the fly in the ointment is that the border is white, and can not be changed with the background
You know the line number so that you can quickly locate the code,
, but in addition to adding the line number, you can also use the Alt+g shortcut to quickly reach the specified line.
also indicates the row and column where the cursor is located in the bottom right corner of the idle editor interface.
so, after a lot of hard work, there’s a better way to solve the problem of locating code quickly.

Read More: