HP Forums
Python clear console screen - Printable Version

+- HP Forums (https://www.hpmuseum.org/forum)
+-- Forum: HP Calculators (and very old HP Computers) (/forum-3.html)
+--- Forum: HP Prime (/forum-5.html)
+--- Thread: Python clear console screen (/thread-18603.html)



Python clear console screen - raider - 07-30-2022 01:19 PM

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


RE: Python clear console screen - Eddie W. Shore - 06-30-2023 03:36 PM

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.


RE: Python clear console screen - Dougggg - 07-01-2023 02:57 AM

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