Copy the clearwindow.py file and place it under the Python installation directory, Python xxx\lib\idlelib (XXX is your Python version, for example, 2.7).
Notepad opens the Config-extensions.def (Idle extended configuration file) under the Python xxx\lib\idlelib directory, and to prevent errors, you can copy a backup before opening it.
Modify the Config-extensions.def, add the following at the end, and then save the exit:
[ClearWindow]
Enable=1
Enable_editor=0
Enable_shell=1
[Clearwindow_cfgbindings]
Clear-window=<control-key-;>
Open the Python idle,options option to see the addition of Clear shell window Ctrl +;
Enter the code in the idle and press CTRL +; (refers to Ctrl and;) and find that the code you just entered can be cleared.
Shortcut keys CTRL +; can be modified to a different key to
Clear-window=<control-key-;>
Control and modify the other key.
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.