a reverse traceback magic for jupyer notebooks
Project description
reverse_tb
Install
pip install reverse_tb
How to use
from reverse_tb.core import reverse_tb
def foo():
return bar()
def bar():
return baz()
def baz():
try:
qux()
except KeyError as e:
raise Exception
return qux()
def qux():
d = {}
return d['key']
foo()
Exception:
foo()
---------------------------------------------------------------------------
Exception:
Cell In[3], line 11, in baz()
9 qux()
10 except KeyError as e:
---> 11 raise Exception
12 return qux()
Cell In[3], line 5, in bar()
4 def bar():
----> 5 return baz()
Cell In[3], line 2, in foo()
1 def foo():
----> 2 return bar()
Cell In[5], line 1
----> 1 foo()
Exception Traceback (last call first)
During handling of the above exception, another exception occurred:
KeyError: 'key'
Cell In[3], line 16, in qux()
15 d = {}
---> 16 return d['key']
d = {}
Cell In[3], line 9, in baz()
8 try:
----> 9 qux()
10 except KeyError as e:
KeyError Traceback (last call first)
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
reverse_tb-0.0.1.tar.gz
(8.2 kB
view details)
Built Distribution
File details
Details for the file reverse_tb-0.0.1.tar.gz
.
File metadata
- Download URL: reverse_tb-0.0.1.tar.gz
- Upload date:
- Size: 8.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9758358050aea4bb55bc8e067169aae290947845bc91b2ec58ed94427bca8209 |
|
MD5 | 1f7e20ed1a586042b574c74ca3c82465 |
|
BLAKE2b-256 | 77fd07f48a741f5c213117432571797b44558728b16a5215e8f45407331a6b82 |
File details
Details for the file reverse_tb-0.0.1-py3-none-any.whl
.
File metadata
- Download URL: reverse_tb-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 820381954131db16eec2f83ae73b4a52dbed6c3eb4154358c338d9e1ef471170 |
|
MD5 | d1d85865b23e8d316eb4d9d2aa0da73b |
|
BLAKE2b-256 | 11e55bcfe340017c3bf9526735b42ba2f0fb6c18ca5a4dc2d9ccd854bdd58d18 |