A tree-style Python error formatter that replaces the default traceback printer.
Project description
ErrMap
A tree-style Python error formatter that replaces the default traceback printer with a clean, colour-coded call tree.
[ERR-MAP] Traceback detected
root
└── main_loop (line 12)
> game_update()
│ └── game_update (line 9)
> physics_calc()
│ │ └── physics_calc (line 6)
> return 1 / 0
ZeroDivisionError: division by zero
Install
pip install errmap
Usage
from errmap import ErrMap
errmap = ErrMap()
errmap.install()
That's it. From that point on any unhandled exception will print as a tree instead of the default traceback.
API
ErrMap()
Creates a new ErrMap instance.
errmap.install()
Replaces sys.excepthook with the tree formatter.
errmap.active
Set to False to temporarily disable ErrMap and fall back to the default traceback printer.
errmap.active = False # default traceback
errmap.active = True # tree formatter
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file errmap-1.0.0.tar.gz.
File metadata
- Download URL: errmap-1.0.0.tar.gz
- Upload date:
- Size: 3.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f28fa63bed9682a368c9ad17f09c83b1378c5c23cd24c7b3d988901fd94b7941
|
|
| MD5 |
e35a5be0b80d310a62536bbd4146e727
|
|
| BLAKE2b-256 |
52235ce87f76003d8033c935f6527b84c87955c500f587bbb1ba71eb56cc0d16
|
File details
Details for the file errmap-1.0.0-py3-none-any.whl.
File metadata
- Download URL: errmap-1.0.0-py3-none-any.whl
- Upload date:
- Size: 3.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
be64e985e40fa770077d275835b7f6351c5835352b47fba9f1a65df0ac3d197d
|
|
| MD5 |
8c54b859cac50e1e0358fab0490ab7d1
|
|
| BLAKE2b-256 |
1e537da3968190d78c0a3b54b20a5b1acf09663a4e34bedca3249468e104f001
|