Hey I am using the progressbar package from pypi and i really like it a lot. My problem is that I haven’t found a way so far to display custom text. What I mean with that is displaying text that changes when I call pbar.update()
For example if i scan my computer recursively for files I want the progress bar to change to the current file.
widgets = [CustomText(), ' ', Percentage(), ' ', Bar('/'), ' ', RotatingMarker()]
pbar = ProgressBar(widgets=widgets, maxval=1000)
pbar.start()
pbar.update(0, "custom_string")
Something like this would work out best for me. But since the update function only takes a number I am not sure how to implement something like this without changing progress bar library itself.
Thanks in Advance
I tried to use
updatemethod in theFormatLabelwidget to change the contents of the label, but it didn’t work for me. However, replacing theFormatLabelwith a completely new object worked for me: