i have a thread that calculates the time every 1 second to get the total elapsed time. This works great but i need to make it stay on the same line even after printing another line. Currently it is doing this:
[~] 00:00:02
ok #this is a test print to see if it stays on the same line and of course it dosen't.
[~] 00:00:08
def total_elapsed_time(start):
while True:
elapsed_time = time.time() - start
print(colorama.Fore.LIGHTBLUE_EX + "[~] " + time.strftime("%H:%M:%S", time.gmtime(elapsed_time)), end="\r")
time.sleep(1) #updates every second
this is my code. Ive been reading about \r \n and \r\n and \r does the job partially but i still need it to stay on the same line always. I'm not sure if this is even possible although i have seen it done in other languages so i think it is.