How do I clear the terminal(ANDROID QPYTHON) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 6

How do I clear the terminal(ANDROID QPYTHON)

I tried animating my ascii string but somehow it didnt work. I just want to make it: ----- ------ Into this: ------ ----- I found an answer here in SL QnA but somehow it didn't work for me, well of course, only for Linux and windows. It shows "sh: clear not found" and "sh: cls not found" What do I do?

1st Oct 2019, 5:24 AM
Name Omitted until I come back
9 Answers
+ 4
diego Code module object has no attribute "run"
1st Oct 2019, 7:48 AM
Name Omitted until I come back
+ 4
diego Code No such file or directory "clear" Btw this is python 3.2
1st Oct 2019, 11:41 AM
Name Omitted until I come back
+ 4
Unfortunately as I said in question lvl 1 crook, it says sh: clear: not found
1st Oct 2019, 3:17 PM
Name Omitted until I come back
+ 4
Still no lvl 1 crook Also your qpython is in latet version which is python 3.6 Well im in qpython 3.2 :'(
1st Oct 2019, 3:44 PM
Name Omitted until I come back
0
don't listen to the others, this one actually works import os os.system("clear")
1st Oct 2019, 3:07 PM
Shen Bapiro
Shen Bapiro - avatar
0
hmm.. i actually downloaded QPython on my android as well. and it works when i tested the following codes i sent you if that doesn't work then i guess i can't help you further since i have no other solutions. the only advise i can give you is to find a way to use system commands on your python terminal i don't think this will work but did you try os.system("cls")
1st Oct 2019, 3:22 PM
Shen Bapiro
Shen Bapiro - avatar
- 1
import subprocess subprocess.run(["clear", ""])
1st Oct 2019, 7:08 AM
unChabon
unChabon - avatar
- 1
OfficialAz3 try .call() instead subprocess.call(["clear"])
1st Oct 2019, 10:08 AM
unChabon
unChabon - avatar
- 1
lvl 1 crook ... "Don't listen to the others..." ? Really?
1st Oct 2019, 4:11 PM
unChabon
unChabon - avatar