We can run these system calls through the Python to clear screen. For the Linux system, clear command works. System calls to clear the console: For the window system, cls clear the console.
Most vt100 terminals do not support color, so you need to tell GNU ls that yours does. You can clear the Python interpreter console screen using a system call. And no annoying (well to me anyway) clear-screens at the end of a command! One caveat is that if you use GNU's ls, you MAY have to change the. Only new Terminal windows will pick this up.īoth Apple's supplied /bin/ls and emacs syntax colorized highlighting work great with vt100 and color. D'oh!!įortunately, this behaviour can actually be defeated quite easily! Simply edit your Terminal -> Preferences and change'Declare Terminal Type ($TERM) as:' to 'vt100' and close the window. In this case, less exits if the entire file fits on the screen. i dont think this one has been mentioned yet. see the man page for more info, you can also do alot of other things with tput too. there are other options for tput too for controlling the terminal display. One particularly frustrating behavior occurs if you do an less -F on a tiny file. you can also clear the screen by using a command called tput and the option clear. I typically do a man or a less, then want to copy/paste some info, such as command line parameters, into the same window. With the new Terminal, certain UNIX commands ( vi, less, man, etc.) cause the window to clear when they're done.