Clearing output screen

Ivan Shevanski darkpaladin79 at gmail.com
Mon Nov 7 01:42:27 CET 2005


On 11/6/05, Fredrik Lundh <fredrik at pythonware.com> wrote:
>
> 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 <http://os.name> == "nt":
> os.system("cls")
> else:
> os.system("clear")
>
> </F>
>
>
>
> --
> http://mail.python.org/mailman/listinfo/python-list
>
That seems to work just fine. Thanks Fredrik!



-Ivan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20051106/afe0f522/attachment.html>


More information about the Python-list mailing list