Quand je lance, par exemple:problèmes avec time.sleep
print("[",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("=",end=" ")
time.sleep(1)
print("]",end=" ")
Rien ne se passe pendant 10 secondes, puis l'ensemble [= = = = = = = = = =] apparaît. Comment puis-je empêcher cela afin qu'il puisse agir comme une sorte de barre de progression?
oww, c'est méchant. Qu'en est-il des boucles? Ils n'ont jamais rien fait de mal pour mériter une telle ignorance flagrante! Avoir un coeur, mec! – LukeN
duplication possible de [Problèmes avec sys.stdout.write() avec time.sleep() dans une fonction] (http://stackoverflow.com/questions/2808832/problems-with-sys-stdout-write-with-time -sleep-in-a-function) – tzot