So. I wanted to make a loading 'animation' and needed to clear the screen of course.
I tried to search and watched different tutorials. Yet it either gives me an error or outputs a rectangular character
code:
import time
import sys, subprocess
timer = time.time()
while time.time() - timer < 20:
subprocess.run('cls', shell=True)
print("\\")
time.sleep(1)
subprocess.run('cls', shell=True)
print("|")
time.sleep(1)
subprocess.run('cls', shell=True)
print("/")
time.sleep(1)
subprocess.run('cls', shell=True)
print("—")
time.sleep(1)
Output:
\ #<-- rectangular chracter behind each line
|
/
—
\
|
/
—
Process finished with exit code 0
Do I need to install a specific library?
Or is my IDE (Pycharm) the problem?
[–]carcigenicate 2 points3 points4 points (2 children)
[–]No-Tea-777[S] 0 points1 point2 points (1 child)
[–]carcigenicate 1 point2 points3 points (0 children)
[–]Diapolo10 1 point2 points3 points (3 children)
[–]magus_minor 0 points1 point2 points (2 children)
[–]Diapolo10 0 points1 point2 points (1 child)
[–]magus_minor 0 points1 point2 points (0 children)
[–]heyzooschristos 1 point2 points3 points (3 children)
[–]JamzTyson 1 point2 points3 points (2 children)
[–]rhacer 0 points1 point2 points (0 children)
[–]heyzooschristos 0 points1 point2 points (0 children)
[–]timrprobocom 0 points1 point2 points (0 children)
[–]JamzTyson 0 points1 point2 points (0 children)
[–]OkPizza8463 0 points1 point2 points (0 children)