Python IDEL adds the clear screen function and pythonidel clear screen function

Source: Internet
Author: User

Python IDEL adds the clear screen function and pythonidel clear screen function

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 = 1
Enable_editor = 0
Enable_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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.