15

IPython and Friendly-traceback

 3 years ago
source link: https://aroberge.blogspot.com/2020/12/ipython-and-friendly-traceback.html
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

IPython and Friendly-traceback

 This is a quick update on the status of Friendly-traceback. As of today, it works with the IPython console, and works even better in a JupyterLab environment.  

First, a comparison with using it in the new Windows terminal making use of Rich for syntax highlighting, which is something that has been working for quite a while now.

friendly-dec9.png

Next, is the same example in an IPython console, running in a Windows terminal.

ipython.png

I've tried to use Rich to do syntax colouring with the IPython console ... but the result is really disappointing. 

ipython-rich.png

Finally, here's what it looks like in the JupyterLab environment.

jupyterlab.png

Right now, it is not possible to select a different theme for syntax highlighting; this will have to wait until later.

To find out more about Friendly-traceback (excluding this new IPython experimental support), please consult the documentation.


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK