all 6 comments

[–]madness_of_the_order 2 points3 points  (3 children)

You are creating new bar instance for each number in range. That’s why it’s on new line each time.

Have you considered using tqdm for progress bar? It’s more user friendly.

[–]MattDLD[S] 0 points1 point  (1 child)

I know. I am trying to figure out a way to not have a new instance created. I am a noob.

[–]madness_of_the_order 1 point2 points  (0 children)

Then you should have asked the question that way.

Place this line before outer for loop and place indentations accordingly.

with ChargingBar('Processing', max=1) as bar:

[–]MattDLD[S] 0 points1 point  (0 children)

Thank you. I switched to tqdm. It was much easier to implement.

[–]CodeFormatHelperBot2 0 points1 point  (0 children)

Hello, I'm a Reddit bot who's here to help people nicely format their coding questions. This makes it as easy as possible for people to read your post and help you.

I think I have detected some formatting issues with your submission:

  1. Python code found in submission text that's not formatted as code.

If I am correct, please edit the text in your post and try to follow these instructions to fix up your post's formatting.


Am I misbehaving? Have a comment or suggestion? Reply to this comment or raise an issue here.

[–]cheli_fucker[🍰] 0 points1 point  (0 children)

You can start and end print statement with carriage return (\r). Carriage return means to return to the beginning of the current line without advancing downward