On Sat, Sep 17, 2016 at 8:51 PM, João Matos <[email protected]> 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 [email protected] https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/
