It's true that most all real programmers would never want the history of the Standard Output (your PC's display) to erase itself for no reason. It's not there to look pretty, it's there to provide you with information. The next common request from beginners is "How do I color certain words?". The answer really is... Don't. If you want a pretty interface you need to learn a GUI toolkit. Trying to force the console window to jump through hoops is a frustrating, OS-specific waste of your effort that will almost certainly disappoint you even if you do figure it out. All computer languages (except LabVIEW and some GUI-based) take input as a stream of ASCII characters (from your keyboard) and output the same (to your display). They have no knowledge of a graphics card or it's drivers which means you have to learn all that or use an OS specific package like CURSES (http://en.wikipedia.org/wiki/Curses_(pr ... ng_library
)) to control the screen. By the time you do that, you could have learned TKinter and be making MUCH more professional looking GUI programs. EDIT: I don't mean that TKinter is the most professional looking, but it is easy and comes with most Python distributions.
BTW, as Stranac already said, the input screen I'm typing this into is not a console. It's a TextBox Widget running in a GUI interface on a webpage.
Spend your time learning how to do that and leave console manipulation back in the 80's.
If you really need a little screen space:
- Code: Select all
for i in range(10): print "" # Print 10 blank lines