Why is there no platform independent way of clearing a terminal?

Lawrence D'Oliveiro ldo at geek-central.gen.new_zealand
Sat Jul 31 21:56:52 EDT 2010


In message <mailman.1203.1280235285.1673.python-list at python.org>, Daniel 
Fetchinson wrote:

> Sure, there are many different terminals and many different operating
> systems but in many areas python managed to hide all these complexities
> behind a well defined API.

Once upon a time, there were indeed many different kinds of actual physical 
terminals.

However, they are all extinct now. All that’s left is software emulations. 
And the one emulation they all have in common is the DEC VT100.

So just assume you’re displaying on one of those:

    sys.stdout.write("\x1b[2J")




More information about the Python-list mailing list