[Tutor] clear screen inside python interpreter
Alan Gauld
alan.gauld at btinternet.com
Fri Aug 7 02:49:25 CEST 2009
"Monte Milanuk" <memilanuk at gmail.com> wrote
> Okay, simple question: is there anything similar to to 'clear' or 'cls'
> to
> clean up a console window full of commands in the python shell? Short of
> exiting and restarting the interpreter I'm not having a lot of luck here.
Terminal control is very system dependant.
Fred Lundh did crate a platform independant console module that
allowed cursor control and clearing of screens etc. Google should
find it for you.
But in your case os.system() or subprocess.call() are probably your
best bet. or just print('\n' *100)
--
Alan Gauld
Author of the Learn to Program web site
http://www.alan-g.me.uk/
More information about the Tutor
mailing list