Python怎么清屏?Python清屏的操作步骤
时间:2023-03-02 18:01
本期为你们带来的内容是关于Python软件的,你们知道Python怎么清屏吗?下文这篇文章就为大伙带来了Python清屏的操作步骤,让我们一同去下文中看看吧。
Python怎么清屏?Python清屏的操作步骤
python内置的解释器IDLE,输入输入太多需要清理屏幕怎么办

点击python的属性,查找Python安装目录PythonXLibidlelib下面,加入clearwindow.py文件

在Python3.8Libidlelib目录,找到config-extensions.def配置文件

修改这个文件之前,先复制保存一份。

打开配置文件之后,在文件末尾添加如下代码:
[ClearWindow]
enable=1
enable_editor=0
enable_shell=1
[ClearWindow_cfgBindings]
clear-window=

设置好之后保存,打开Python的IDLE,options选项中就可以看到增加了

然后在python 的IDLE界面,然后按Ctrl+L;(是指Ctrl和L

以上就是Python清屏的操作步骤的全部内容,更多精彩教程请关注Gxl网!