Clearing a DOS terminal in a script
Chris Mellon
arkanes at gmail.com
Thu Dec 13 12:21:34 EST 2007
On Dec 13, 2007 10:48 AM, Stephen_B <stephen at theboulets.net> wrote:
> This doesn't seem to work in a dos terminal at the start of a script:
>
> from os import popen
> print popen('clear').read()
>
> Any idea why not? Thanks.
It opens "clear" with it's own virtual terminal and clears that
instead. There's an ANSI control code you can use to reset the screen,
try printing that.
More information about the Python-list
mailing list