fastai / fastprogress

Simple and flexible progress bar for Jupyter Notebook and console
Apache License 2.0
1.08k stars 105 forks source link

won't work in spyder? #82

Open shammyD opened 3 years ago

shammyD commented 3 years ago

Trying usage example 1 in Spyder v5.0.0, python 3.9.2 and won't work?

Just static white boxes at the side that don't grow with job progress....

Screenshot from 2021-04-27 11-07-26

johan12345 commented 3 years ago

Maybe this is the same problem as in PyCharm, see #62 and #89. A workaround seems to be to add the following:

from fastprogress import fastprogress
fastprogress.printing = lambda: True
impact27 commented 2 years ago

I fixed it in spyder with:

import sys
sys.stdout.isatty = lambda: True

Apparently fastprogress only works if sys.stdout.isatty() is True or if you are inside a notebook. See https://github.com/spyder-ide/spyder-kernels/issues/294