I'm using the Python progress library to add a basic progress bar to my program, and I'm finding that it's printing extra unexpected characters. I've tried looking in the source code and the known issues, but I can't figure out what's happening.
Here's my code:
from progress.bar import Bar
import time
bar = Bar('Processing', max=10)
for i in range(10):
time.sleep(1)
bar.next()
bar.finish()
Per the documentation, I should expect a bar like the following:
Processing |############# | 5/10
But the actual output looks like this:
[KProcessing |################################| 10/10
[?25h
Here it is as a picture so you can see the weird characters
Why is it printing the "K" and "[?25h" and the weird question mark in the box?
Where is the "K" and the weird question mark and the "[?25h "? How do I get rid of these?