Newbie- how to basics
Fernando Pérez
fperez528 at yahoo.com
Sat Nov 9 23:25:52 EST 2002
Tony C wrote:
> 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.
>
>
> Another useful feature would be command line history (up arrow, down
> arrow, etc), like in the Unix shells.
>
> Would ssomeone point me to some docs (specific locations) which
> descibe these features ?
>
You may want to try IPython at
http://www-hep.colorado.edu/~fperez/ipython/
It's a python interactive shell which has all of those already set for you.
>From a python script, you make system calls via os.system():
import os
os.system('clear') # calls the 'clear' system command in a sub-shell
Cheers,
f
More information about the Python-list
mailing list