Python - limpando a tela independente do SO

# source: http://stackoverflow.com/questions/517970/how-to-clear-python-interpreter-console
import os
def cls():
os.system(['clear','cls'][os.name == 'nt'])
# now, to clear the screen
cls()
# também achei uma opção assim:
# http://forums.devshed.com/python-programming-11/how-works-os-system-clear-and-cls-584090.html
os.system(['clear','cls'][1])
view raw gistfile1.py hosted with ❤ by GitHub

linux-cookbook

Grupos do Google
Participe do grupo linux-cookbook
E-mail:
Visitar este grupo