Python IDEL adds the clear screen function instance, pythonidel
Add a clear window extension for the idle (see the description of this extension in http://bugs.python.org/issue6143 ).
The following describes how to install and use it. First download clearwindow. py (you can click to download directly. If you cannot download it, you can right-click to save it. The format ends with py). Put this file in the Python X \ Lib \ idlelib directory (X for your python version ), then find the config-extensions.def file (the idle Extension Configuration File) in this directory and open it in Notepad (to prevent errors, you can copy a backup before opening it ). Yes, it may look very dense after it is opened. If you can, it is recommended that you use a Notepad ++ or vim editor to open it.
After opening the config-extensions.def, add the following sentence at the end of the sentence:
[ClearWindow] enable = 1enable_editor = 0enable_shell = 1 [ClearWindow_cfgBindings] clear-window = <Control-Key-l>
Save and exit.
Open the python idle and check whether there is an option clear shell window ctrl + L in options.
If this is the case, it will prove that you have successfully installed it. In the future, you need to clear the screen and press ctrl + L.
The above example of adding the clear screen function to the IDEL of Python is all the content that I have shared with you. I hope to give you a reference and support for the help house.