[Tutor] re clear screen
Magnus Lycka
magnus@thinkware.se
Mon Nov 11 19:34:01 2002
At 00:10 2002-11-12 +0900, kevin parks wrote:
>>import os
>>os.system("cls")
>>
>>UNIX:
>>os.system("clear")
>
>Wow on M$ it's cls and on UNIX clear? How unbelievably unpythonesque.
Operating system commands are rarely Pythonesque.
It is very pythonesque to read the library module
reference though. ;)
If something is inside quotes it's a clear hint
that it's not handled by python itself...
Regarding user interfaces, the native things in
python are basically:
sys.stdin, sys.stdout, sys.stderr, print, input
and raw_input
Anything beyond that will depend on some external
library. AFAIK, there is no platform independent
character-based user interface. If you want cross
platform UIs beyond what pipes, print and raw_input
provides, use a GUI like Tkinter.
--
Magnus Lycka, Thinkware AB
Alvans vag 99, SE-907 50 UMEA, SWEDEN
phone: int+46 70 582 80 65, fax: int+46 70 612 80 65
http://www.thinkware.se/ mailto:magnus@thinkware.se