kuk / log-progress

https://habr.com/ru/post/276725/
MIT License
564 stars 60 forks source link

Does not work in Jupyter notebook #20

Closed konradjurk closed 4 years ago

konradjurk commented 4 years ago

Prints VBox(children=(HTML(value=''), IntProgress(value=0, max=360334)))

Server Information: You are using Jupyter notebook.

The version of the notebook server is: 6.0.0 The server is running on this version of Python: Python 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21) [GCC 7.3.0]

Current Kernel Information: Python 3.7.3 | packaged by conda-forge | (default, Jul 1 2019, 21:52:21) Type 'copyright', 'credits' or 'license' for more information IPython 7.11.1 -- An enhanced Interactive Python. Type '?' for help.

konradjurk commented 4 years ago

Nevermind, this is way too complicated for little benefit.

This does the job without any magic:

from IPython.display import clear_output

for i in range(...):
     if i % 250 == 0:
        clear_output(wait = True)
        print(i)