I often see a spinning animation in the command prompt/shell consisting of -, /, and \. This type of printing, which simply overwrites whatever is already there, is also used to show progress in downloading stuff with command line applications.
How is this done?
I often see a spinning animation in the command prompt/shell consisting of -, /,
Share
Usually this is done by printing a backspace character (ASCII code 8) and then the next character in the sequence. In most programming languages you can just use
\bin a string for this.For example, here is some Python code for this: