Re: screen clear question

2005-01-05 Thread Andrew Robert
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

2005-01-02 Thread Alan Gauld
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

2005-01-02 Thread 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.

Cheers,
Nick.
--
Nick Coghlan   |   [EMAIL PROTECTED]   |   Brisbane, Australia
---
http://boredomandlaziness.skystorm.net
--
http://mail.python.org/mailman/listinfo/python-list


Re: screen clear question

2005-01-02 Thread Alan Gauld
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

2005-01-01 Thread Daniel Bickett
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

2005-01-01 Thread Craig Ringer
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

2005-01-01 Thread jcollins
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