at sounds like a very special status. Why not os.clear()?
I do agree with the motivation for doing this. (I've started doing more exploratory programming and I've felt this need clearly a few times.)
Frankly, you can't do hardly any scripting without importing at least os or sys anyway. And "scripting" environments could pre-import whatever they want.
I can't comment on the exact semantics or implementation (though I'd prefer it if it didn't have to run a subprocess).
IDLE should probably monkey-patch this so it does something reasonable in its shell window.
I'm not sure if there's anything to do to make that easier, but it would be good if it were easy for any terminal emulator in IDEs, etc to have it to hook into.
I also have no idea about implementation, but I"m sure there's a few folks with platform expertise that could make this work on many systems out of the box.
if os.name == 'posix':
def _term_clear():
os.system('clear')
elif sys.platform == 'win32':
def _term_clear():
os.system('cls')
else:
def _term_clear():
pass
is it so bad to use a subprocess?
-CHB
--