fastprogress: Not working in jupyter console

Is there a way to get console behavior in Jupyter console? Currently it just says <IPython.core.display.HTML object>

Jupyter console 6.0.0

Python 3.7.1 (default, Dec 14 2018, 19:28:38)
Type 'copyright', 'credits' or 'license' for more information
IPython 7.2.0 -- An enhanced Interactive Python. Type '?' for help.

In [1]: get_ipython().__class__.__name__
Out[1]: 'ZMQInteractiveShell'

In [2]: from fastprogress import master_bar, progress_bar
      : from time import sleep
      : mb = master_bar(range(10))
      : for i in mb:
      :     for j in progress_bar(range(100), parent=mb):
      :         sleep(0.01)
      :
<IPython.core.display.HTML object>

About this issue

  • Original URL
  • State: closed
  • Created 5 years ago
  • Comments: 16 (11 by maintainers)

Most upvoted comments

@sgugger Looks like the first part of is_in_ipython() would work for me. I mostly use this in emacs, where python-shell-interpreter is set tojupyter-console.

In [3]: program_name
Out[9]: 'emacs'

In [11]: 'JPY_PARENT_PID'   in os.environ
Out[11]: True