In python is there an easy way to rewrite printed line?
But I'm not talking about last printed line because for that is:
print("text", end="\r")
Then my last resort is using os.system("cls")
and printing all info with changed line again.
I wanted to recreate anaconda downloading or docker build.
I know maybe it's duplicate question but I haven't found it if so my bad.
Example:
text
text2
text3
After change:
text
hello_world
text3
It could be this code:
import os
print('text')
print('text2')
print('text3')
os.system('cls')
print('text')
print('hello_world')
print('text3')
But with more printed lines it would be quite annoying to always rewriting all lines
Maybe it is C magic that's my only way to describe what they have done in anaconda or docker.