[Tutor] Re: clear screen [Let's make a feature request in Sou
rceforge!]
alan.gauld@bt.com
alan.gauld@bt.com
Sun Nov 17 12:35:02 2002
> >primitive user interfaces that we know are evil and crude,
> Somehow, I feel the bad old platform dependent
> os.system('cls') or os.system('clear') is better.
I'm with Magnus here. I think its important for newbie
programmers to learn, quite early that platform issues
make a difference and that you shouldn't assume that your
users terminal will work the same as yours - even on the
same OS. Thats why the os.name tests are spurious.
I could be working on Linux via a teletype, in which case
clear() won't do anything - but thats OK I guess... or
I could be working on some exotic OS that runs multiple
terminal sessions on one console, interleaved with each
other(mainframe operations people know what I mean! :-)
Clearing the screen with 24 new lines would be incredibly
unfriendly since it would ose the interleaved data from
the other sessions!
Better to learn the hard way that some things are not to
be taken for granted. If you need to know ask the user
about their environment(through a config program maybe)
or use the OS (termcap etc) to see whats possible.
> Perhaps we will have a big gap here until someone
> creates something like Delphi or Visual Basic for
> Python.
<rant>
I love Delphi, but I think these IDEs steer beginners
in lots of bad directions, not least in assuming that
the world is a GUI place. Of course being pragmatic
most of us do live in GUI land, but being able to lash
a GUI screen together does not a programmer make and
VB/Delphi put the focus on GUI design rather than program
design - a bad thing IMHO.
</rant>
Alan g.
Author of the 'Learning to Program' web site
http://www.freenetpages.co.uk/hp/alan.gauld