Clear the screen on unix terminals, uses terminfo.
terminfo inspiration courtesy of http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/475116
1 2 3 4 5 | def clear_screen():
import curses, sys
curses.setupterm()
sys.stdout.write(curses.tigetstr("clear"))
sys.stdout.flush()
|
Thans for that. I couldn't find anything portable but this does work on Mac OS X and Linux!