Newbie- how to basics
Terry Hancock
hancock at anansispaceworks.com
Sun Nov 10 03:30:45 EST 2002
On Saturday 09 November 2002 10:06 pm, python-list-request at python.org wrote:
> Tony C wrote:
> > I've gone through much of the documentation included with Python
> > 2.2.2, but can find any kind of reference on how to clear the screen
> > from a python script, or at the command line.
Any really cross-platform language is going to be vague on that sort
of point because it doesn't make sense everywhere. A python program
might be running in an environment where it doesn't even have a
screen to clear, or in a GUI environment, web server, etc., where "clearing
the screen" would mean something really different from what I think
the OP meant.
> > Another useful feature would be command line history (up arrow, down
> > arrow, etc), like in the Unix shells.
="readline support", which is provided if you compile Python right
(I've never really understood why this is difficult, but it hasn't been
automatic on any system I've built Python on -- you have to edit
the Setup file). There's documentation for doing this in the source
bundle.
> I just started looking monitoring this newsgroup with the thoughts that
> I might want to learn python. It looks like a friendly group (unlike
> comp.lang.c) It took me awhile to learn how to clear the screen in a C
> program in Linux. What works there is the following:
>
> system("clear");
import os
os.system("clear")
should do the same thing. But you're actually passing a clear
command to the shell.
> Let me know if this works for you in python. I think I will start learning
> python. The user community seems friendly.
Nah, we're just luring you in. I secretly plan to roast you later. ;-D
Cheers,
Terry
--
Terry Hancock ( hancock at anansispaceworks.com )
Anansi Spaceworks http://www.anansispaceworks.com
More information about the Python-list
mailing list