Jupyter ignores dual_line mode; Pycharm must enable "Emulate terminal"
See original GitHub issueFirst of all, thanks a lot for alive-progress
! I find it cool and very useful.
I’ve noticed an issue in environments that require force_tty=True
when dual_line=True
is enabled, like in Jupyter notebooks or in PyCharm without enabling terminal emulation: the progress bar gets printed as new lines instead of being updated; see screenshot below.
While it is easy to work around in PyCharm, that is not the case with Jupyter notebooks.
Thanks 😃
Issue Analytics
- State:
- Created a year ago
- Comments:5 (3 by maintainers)
Top Results From Across the Web
Jupyter notebook support | PyCharm Documentation - JetBrains
To enable them, open project settings/preferences ( Ctrl+Alt+S ), go to Languages & Frameworks | Jupyter, and select the Show cell toolbar checkbox....
Read more >PyCharm - Run and debug Jupyter notebook code cells
When executing one cell at a time, mind code dependencies. If a cell relies on some code in another cell, that cell should...
Read more >How to emulate terminal output and allow parallel run by ...
I commonly right click a tab and select `Run '
Read more >Jupyter Notebook not Working in Pycharm
Hello, I'm trying to run Jupyter Notebooks on PyCharm Professional 2020.2.When I open a ipynb file, PyCharm starts a managed Server with...
Read more >vim emulation broken in jupyter notebook in Pycharm ...
I can enter command mode as follows: enter a cell while Vim Emulator is disabled. Then with cursor in cell, enable Vim Emulator....
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Hi @alllexx88, thank you.
I’ve already told here, a lot of times actually, that Jupyter does not support ANSI Escape Codes. This means it simply ignores the command to make the cursor go up and refresh the previous line, thus it is impossible to make dual line work on it.
Actually, it even ignores the most basic commands, like the one to clear the current line! I had to print several spaces at the end of the line to work around that and clear the garbage from the last line… The same can be said about Pycharm without terminal emulation. These needed commands are ignored if this option is not enabled, so it doesn’t even make sense to try to run it there like this. I don’t even understand why would Jetbrains require an option to make the terminal actually work, it seems silly to me.
That’s it, I expect it should be pretty clear by now that these fancier modes require a terminal. It simply can’t be done if the environment summarily ignores the needed cursor commands.
Thank you @alllexx88, have a good one too! 👋