在python中清除屏幕
问题描述:
可能的重复:
python 中的清除终端
如何清除所有文本的窗口,使其看起来像是刚刚打开?
How can I clear the window for all text, so that it looks like it has just been opened?
我听说 os.system("clear") 有效,但没有.
I've heard os.system("clear") works, but it didn't.
在 Windows 7 上使用 Python 2.6.5
Using Python 2.6.5 on Windows 7
答
clear
适用于 linux,我相信.cls
应该可以解决问题:
clear
is for linux, I believe. cls
should do the trick:
os.system("cls")