Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

alive_progress bar not working on PyCharm

I am trying to use the alive_progress alive_bar on PyCharm but it only appears in the console once the whole process has finished. Instead, I want it to display and progress as the for loop operates.

Toy example:

from alive_progress import alive_bar
import time

bar_l = 100
with alive_bar(bar_l) as bar:
    for i in range(bar_l):
        time.sleep(0.001)
        bar()

Has anyone else encountered this problem?

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

>Solution :

There is a option to force enable it and see alive-progress in PyCharm. It’s "force_tty=True"

with alive_bar(1000, force_tty=True) as bar:
for i in range(1000):
    time.sleep(.01)
    bar()
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading