This is my simple code. It does not work in PyCharm but it's working in cmd
import time
dic = ['....','...=','..=.','.=..','=...']
while True :
for i in range(len(dic)):
print(dic[i],end='\r')
time.sleep(.3)
This is my simple code. It does not work in PyCharm but it's working in cmd
import time
dic = ['....','...=','..=.','.=..','=...']
while True :
for i in range(len(dic)):
print(dic[i],end='\r')
time.sleep(.3)
There is indeed an issue with PyCharm which seems to have an issue with the print(end='\r') combined with time.sleep(). Here is a workaround I found :
for x in range (len(dic)):
b = dic[x]
sys.stdout.write('\r'+b)
time.sleep(0.5)