Clear screen

Rune Nesheim rune at nesheim.net
Sun Nov 25 12:22:11 EST 2001


"Christian Fuhrmann" <C.Fuhrmann at gmx.de> wrote in message news:<9tqlu7$47pu5$1 at ID-110600.news.dfncis.de>...
> Hi!
> How do I Clear the screen in the normal line-commanded window. (In C/C++ I
> say cls();)
> Chris
> (C.Fuhrmann at gmx.de)


Import the os module and then you can use the system function you
would normaly use to clear the screen in your os.
In linux:

import os
os.system('clear')

In dos/windows:

import os
os.system('cls')



More information about the Python-list mailing list