Hello,

In other interpreted programming languages the clear screen command (whatever it is) also does not clear the session.
It just clears the screen clutter.

As I said, this would be very useful for newbies, which don't know anything about usercustomize or sitecustomize.


Best regards,

JM


On 17-09-2016 12:07, Chris Angelico wrote:
On Sat, Sep 17, 2016 at 8:51 PM, João Matos <jcrma...@gmail.com> wrote:
I would like to suggest adding a clear command (not function) to Python.
It's simple purpose would be to clear the REPL screen, leaving the >>>
prompt at the top left of the screen.

This is something very basic but also very useful for newbies learning
Python from the REPL.
After some trial and errors it is best to start with a clean screen.
Clearing the screen helps clear your mind.

I'm not sure that it _is_ helpful, given that you're starting with a
clean screen but not restarting the session (so you'll still have all
the state from your previous work). If you want a completely fresh
start, just exit Python, clear the screen with a shell command, and
re-enter.

The easiest way to play around with this would be to create a pure
Python clear() function in your usercustomize or sitecustomize, and
then try it in your own workflow - see whether it annoys you that it
doesn't change the interpreter state. Maybe it will, maybe it won't.

ChrisA
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to