hyperneato at gmail.com
Fri Dec 29 08:42:55 CET 2006
> > I have the following in my PYTHONSTARTUP file
> > def clear():
> > x = subprocess.Popen("clear").communicate(None)
> > return x
> Yes, but can't you simplify this to just:
> import subprocess
> def clear():
> if all you want to do is clear the screen...
Yes, but this way the screen more unix like after calling the
function- it is cleared and only my prompt is shown at the top of the
screen; which is currently ' python > '
Without communicate() the screen is blank and no prompt.
Thanks for your reply.
More information about the Tutor