Re: [Tutor] How to clear the screen

2008-10-20 Thread Alan Gauld
"W W" <[EMAIL PROTECTED]> wrote if os.system('cls') == 0: pass elif os.system('clear') == 0: pass else: print '\n' * 80 That should take care of most of your OS' out there... Why raise an error when you can just clear it by brute force? -- Alan Gauld Author of the Learn to Pro

Re: [Tutor] How to clear the screen

2008-10-20 Thread bob gailer
W W wrote: On Mon, Oct 20, 2008 at 3:13 AM, Alan Gauld <[EMAIL PROTECTED] > wrote: "Chris Fuller" <[EMAIL PROTECTED] > wrote want to clear the screen, printing the control sequence ESC[2J is all you need.

Re: [Tutor] How to clear the screen

2008-10-20 Thread W W
On Mon, Oct 20, 2008 at 3:13 AM, Alan Gauld <[EMAIL PROTECTED]>wrote: > "Chris Fuller" <[EMAIL PROTECTED]> wrote > > want to clear the screen, printing the control sequence ESC[2J is all you >> need. >> >> print chr(0x1b) + '[2J' > I don't know if this is the most graceful solution... b

Re: [Tutor] How to clear the screen

2008-10-20 Thread Alan Gauld
"Chris Fuller" <[EMAIL PROTECTED]> wrote want to clear the screen, printing the control sequence ESC[2J is all you need. print chr(0x1b) + '[2J' Only on *nix with a VT100 compatible terminal. Doesn't work for vanilla DOS window or Tektronix mode terminals, 3270 etc. Thats why screen contro

Re: [Tutor] How to clear the screen

2008-10-20 Thread Alan Gauld
"Johnny" <[EMAIL PROTECTED]> wrote In this program, it would be really neat if their was a way to clear the screen off. I have inserrted comments as to where I'd like the screen to be cleared. Such a simple question. Such a complex answer :-) It all depends on what OS and terminal setup you

Re: [Tutor] How to clear the screen

2008-10-19 Thread -> Terry <-
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On Oct 19, 2008 at 8:52am, -Johnny- signaled in from cyberspace: - ->Hey friends - ->I am a raw beginner that is going through my first tutorial book. - ->As a personal project, I am trying to write a study program as I progress - ->through my st

Re: [Tutor] How to clear the screen

2008-10-19 Thread Chris Fuller
There are a couple of approaches here. You could use a screen control library like slang or curses (curses is in the standard library), but that is usually overkill if you aren't creating a moderately complex interface. If you just want to clear the screen, printing the control sequence ESC[2

[Tutor] How to clear the screen

2008-10-19 Thread Johnny
Hey friends I am a raw beginner that is going through my first tutorial book. As a personal project, I am trying to write a study program as I progress through my studies. In this program, it would be really neat if their was a way to clear the screen off. I have inserrted comments as to w