Re: Clearing a DOS terminal in a script

2007-12-16 Thread Larry Bates
Stephen_B wrote: On Dec 13, 11:21 am, Chris Mellon [EMAIL PROTECTED] wrote: It opens clear with it's own virtual terminal and clears that instead. Even when I launch the script from a cmd shell with python myscript.py? There's an ANSI control code you can use to reset the screen, try

Re: Clearing a DOS terminal in a script

2007-12-14 Thread Chris Gonnerman
Stephen_B 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. As others have mentioned, you should just do: os.system(cls) Or, you can use my WConio module for fancier work.

Clearing a DOS terminal in a script

2007-12-13 Thread Stephen_B
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. Stephen -- http://mail.python.org/mailman/listinfo/python-list

Re: Clearing a DOS terminal in a script

2007-12-13 Thread Chris Mellon
On Dec 13, 2007 10:48 AM, Stephen_B [EMAIL PROTECTED] 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

Re: Clearing a DOS terminal in a script

2007-12-13 Thread Stephen_B
On Dec 13, 11:21 am, Chris Mellon [EMAIL PROTECTED] wrote: It opens clear with it's own virtual terminal and clears that instead. Even when I launch the script from a cmd shell with python myscript.py? There's an ANSI control code you can use to reset the screen, try printing that. I

Re: Clearing a DOS terminal in a script

2007-12-13 Thread John Machin
On Dec 14, 3:48 am, Stephen_B [EMAIL PROTECTED] 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. Maybe you are using a different dos terminal. What is clear? C:\junkclear 'clear' is not