My code is print("Current progress : something", end = "\r")
and keep repeating
Normally if the terminal is enough wider than the length of words to print, it looks normal as below :
But if the length of words are longer than the width of terminal, it will start to making a new line and instead of carriage return to the line before, it will start at the new line
My idea is not to print the excess code if the width is too small
And also set the specific width and height to the terminal of the user, I had used pywin32
to set this, but pywin32
not available to Linux user, so which module can I use in Linux with the same function with pywin32
Edit : I had made a code as below, but it still can't solve my problem
Length = shutil.get_terminal_size()[0]
print (" "*(Length-10), end = "\r") # Clear Last Line
ProgressPrint = f"Current Progress : {somephrase}\t{somephrase}\t{somephrase}"
print ( ProgressPrint[0:Length-10], end = "\r")