开发者

Clear the screen in python [duplicate]

开发者 https://www.devze.com 2023-01-15 02:29 出处:网络
This question already has answers here: Closed 12 years ago. Possible Duplicate: clear terminal in python
This question already has answers here: Closed 12 years ago.

Possible Duplicate:

clear terminal in python

How can I clear the window for all text, so that it looks like it has just been opened?

I've heard os.system("clear") works, but it didn't.

Using Python 2.6.开发者_JS百科5 on Windows 7


clear is for linux, I believe. cls should do the trick:

os.system("cls")


os.system('cls')

That should work

0

精彩评论

暂无评论...
验证码 换一张
取 消