How to clear Interactive Window?
Peter Abel
p-abel at t-online.de
Tue May 27 12:37:06 EDT 2003
Peter Hansen <peter at engcorp.com> wrote in message news:<3ED36A74.EE22FC39 at engcorp.com>...
> Uriel Wittenberg wrote:
> >
> > I made a 3-line .PY file:
> >
> > ---------------------------------
> > import os
> > os.system('cls')
> > print 'hi'
> > ---------------------------------
> >
> > I run it in PythonWin. It prints 'hi'. I run it again. It prints 'hi'
> > again -- now I see TWO hi's, one below the other. I'd like the Interactive
> > Window cleared whenever I run the program (so after the above I'd only see a
> > single 'hi').
>
> CLS is a DOS command to clear the console window, not a command that
> PythonWin will recognize. PythonWin is its own special environment
> and learning to clear the window there might not be a very portable
> experience. (That's short for "I can't help you on PythonWin". :-)
>
> -Peter
When running programs from the interactive winpython shell, clearing
the shell's screen can be done also interactively by pressing two keys:
**Cntrl-A** (selecting all) and **Del**.
Besides selecting all, also a few special lines can be selected and deleted.
Maybe this helps a little.
Regards
Peter
More information about the Python-list
mailing list