Open PietropaoloFrisoni opened 2 years ago
edit: the statement above of course should be: "in the (shell) terminal the progress bar is displayed nicely, but in the jupyter cell the result is very strange"
Hi Pietropaolo, unfortunately I don't use Jupyter notebooks myself. I'm afraid I cannot help you... If you discover something, a pull request would be highly appreciated. Thanks for reporting and good luck.
I'm guessing that this request comes from experience with https://github.com/tqdm/tqdm , which is well-used in both python and jupyter notebooks, and has produced a common culture of attaching a progress meter to everything. I came here from tqdm.
I looked into tqdm's source code, and unfortunately it appears to craft progress meters for jupyter notebook using html and calls out to the ipython backend to display the html as python objects. This is harder to do from a subprocess written in C++, because the ipython environment with its various variables is not present.
There's information on the communications protocol at for example https://jupyter-client.readthedocs.io/en/stable/messaging.html ; however, I think it might make more sense for the changes here to happen in python, which already has direct access to ipython, using some way to process the terminal formatting characters.
For example, this already exists: https://github.com/adamj9431/notebook_xterm
Hello,
is there a way in order to make this nicely compatible with jupyter notebook?
I am calling some C++ functions from jupyter with python and in the terminal the progress bar is displayed nicely, but on the terminal the result is very strange (see pictures).
Is there an "easy" way to solve this?
Thank you and congratulations!