Clearing output screen

Fredrik Lundh fredrik at pythonware.com
Sun Nov 6 17:17:55 CET 2005


Ivan Shevanski wrote

> I know there is a way to do this, but google doesn't seem to want to find it
> =) There is a command to clear the output screen right?

no, because "output screen" isn't a well-defined concept on modern
operating systems.  the following works in many cases:

    import os
    if os.name == "nt":
        os.system("cls")
    else:
        os.system("clear")

</F>






More information about the Python-list mailing list