1

Is it possible to use a command in python to clear/edit lines printed in the shell? if not, what is a good way to do a loading bar?

Aditya
  • 2,934
  • 23
  • 46
Mothebad
  • 11
  • 1

1 Answers1

1

You can change the print statement to not do a carriage return and newline, but just a carriage return:

print('whatever you want to print', end='\r')

If you want to implement a progress bar, you could do it yourself, or take a look at the many options here

rinkert
  • 6,344
  • 2
  • 11
  • 30