Skip to main content

Friendlier tracebacks, collapsing frames with library code,inline variable values, and adding context

Project description

iWut

Friendlier tracebacks, collapsing frames with library code, inline variable values, and adding context.

wut-vars-ctx-prettier

Installation

pip install iwut

Notebook

%load_ext iwut

Global Usage: You can turn on wut globally to catch and re-render all tracebacks.

%wut on

You can likewise turn off wut with %wut off.

Case-by-case Usage: Once you hit an error, you can use wut to retroactively re-parse the exception. For example, you may have the following

> 1/0
---------------------------------------------------------------------------
ZeroDivisionError                         Traceback (most recent call last)
/tmp/ipykernel_165/2354412189.py in <module>
----> 1 1/0

ZeroDivisionError: division by zero

In the next cell, simply use the line magic

%wut

This will pretty print a friendlier traceback. You can alternatively, prepend the cell magic on a faulty cell, like this:

%%wut
1 / 0

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

iwut-0.0.4.tar.gz (5.5 kB view hashes)

Uploaded Source

Built Distribution

iwut-0.0.4-py3-none-any.whl (9.9 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page