0

is there anyway to clear the screen like if you are using cmd prompt??

yes i kno im a noob but any help would be greatly appreciated

3
Contributors
3
Replies
5
Views
11 Years
Discussion Span
Last Post by pty
0

You can use the command shell:

# with windows
import os

os.system("CLS")

or

# with linux
import os

os.system('clear')

or

# if you don't mind that the cursor is at the bottom
print '\n' * 25

Actually, the best way is to design your program so you don't need the clear the screen.

0

yeah - didn't realise it was the python forum because I just clicked in from RSS :)

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.