Re: screen clear question
Nick Coghlan wrote: Alan Gauld wrote: But the bottom line is that there is no builtin command because the mechanism is different on each platform. I'd have said it was because the inpreter is line-oriented rather than screen-oriented, but YMMV. Cheers, Nick. I would try doing a test against the resident OS the program is running against and set the clear command based on that. -- Thank you, Andrew Robert E-mail: [EMAIL PROTECTED] Ur: http://shardservant.no-ip.info -- http://mail.python.org/mailman/listinfo/python-list
Re: screen clear question
On Mon, 03 Jan 2005 02:15:23 +1000, Nick Coghlan > Alan Gauld wrote: > > But the bottom line is that there is no builtin command > > because the mechanism is different on each platform. > > I'd have said it was because the inpreter is line-oriented rather than > screen-oriented, but YMMV. Yeah, that might be a reason as well :-) But then the early PC GW-Basic or BASICA interpreters were line based too but both provided a CLS command because the *programs* that were written were usually screen based... But they ran on a single OS so a CLS was easily possible. Alan G. Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http://mail.python.org/mailman/listinfo/python-list
Re: screen clear question
Alan Gauld wrote: But the bottom line is that there is no builtin command because the mechanism is different on each platform. I'd have said it was because the inpreter is line-oriented rather than screen-oriented, but YMMV. Cheers, Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://boredomandlaziness.skystorm.net -- http://mail.python.org/mailman/listinfo/python-list
Re: screen clear question
On Sun, 02 Jan 2005 14:23:07 +0800, Craig Ringer <[EMAIL PROTECTED]> wrote: > On Sun, 2005-01-02 at 11:31, jcollins wrote: > > Is there a command in Python to clear the screen? That is without writing > > multiple blank lines. > > Without knowing what 'screen' you're talking about, it's hard to say. If > you mean clearing a terminal, you can call 'tput clear' or > '/usr/bin/clear' on many UNIX systems; no idea about Windows. On Windows the DOS CLS command will clear a command prompt, it also works for CP/M and VAX terminals too. Finally I think the curses module allows you to clear a window, including the main window - ie the terminal screen. In each case run CLS (or clear) via os.system() But the bottom line is that there is no builtin command because the mechanism is different on each platform. Alan G. Author of the Learn to Program website http://www.freenetpages.co.uk/hp/alan.gauld -- http://mail.python.org/mailman/listinfo/python-list
Re: screen clear question
import os # windows os.system("cls") # bash ( mac, linux ) os.system("clear") That's all I can account for. Daniel Bickett -- http://mail.python.org/mailman/listinfo/python-list
Re: screen clear question
On Sun, 2005-01-02 at 11:31, jcollins wrote: > Is there a command in Python to clear the screen? That is without writing > multiple blank lines. Without knowing what 'screen' you're talking about, it's hard to say. If you mean clearing a terminal, you can call 'tput clear' or '/usr/bin/clear' on many UNIX systems; no idea about Windows. -- Craig Ringer -- http://mail.python.org/mailman/listinfo/python-list
screen clear question
Is there a command in Python to clear the screen? That is without writing multiple blank lines. Thanks. Jim C -- http://mail.python.org/mailman/listinfo/python-list