Post Reply 
Python clear console screen
07-30-2022, 01:19 PM
Post: #1
Python clear console screen
Hi all,

I have just started to learn python on the HP Prime. One thing I could not figure out is to clear the console screen when a program first run.

So say I am running this code that ask for an input, it is nicer if i can clear the screen before i input the variable.

How could I do this?

Thanks
Find all posts by this user
Quote this message in a reply
06-30-2023, 03:36 PM
Post: #2
RE: Python clear console screen
I don't see a command that clears the console screen. The only option is the Clear soft button in Num view and that doesn't always appear.
Visit this user's website Find all posts by this user
Quote this message in a reply
07-01-2023, 02:57 AM
Post: #3
RE: Python clear console screen
You can try this, it seems to work

from hpprime import *

eval("PRINT()")

I only tried on one program and the program.text started at the top line so seems to work
Find all posts by this user
Quote this message in a reply
Post Reply 




User(s) browsing this thread: 2 Guest(s)