Newbie- how to basics

Gerhard Häring gerhard.haering at gmx.de
Thu Nov 7 19:08:15 EST 2002


Tony C wrote in comp.lang.python:
> I've gone through much of the documentation included with Python
> 2.2.2, but can find any kind of reference on how to clear the screen
> from a python script, or at the command line.

You could just print the escape sequence for that, but I believe that
there are utility modules for this.

If you need more similar stuff, like posititioning the cursor,
changing colors (or using bold/underline/...) you can use the curses
module instead.  

I'm assuming a Unixish system here. On Windows, the console module
from http://effbot.org/downloads/ might be it.

> Another useful feature would be command line history (up arrow, down
> arrow, etc), like in the Unix shells.

Sounds like the readline module can be of some use to you. I haven't
used it myself, yet.

-- Gerhard



More information about the Python-list mailing list