Informative Stacktrace that shows everything on the stack
Project description
Fattrace
Provides an informative (fat) stacktrace that shows everything on the stack.
Examples
Before:
After:
Highlights
- Removes the need for printf and debugger
- Special handling for array-like objects which have members that are named one of:
- dtype
- shape
- device
- layout
- Similar to tbvaccine, optionally ignores frames from external libraries
Usage
Run fattrace.install() anywhere to replace the standard stack-trace hook (sys.excepthook).
Customization is done by the keyword arguments:
def install(threshold:int=3,
include_self:bool=True,
include_private:bool=False,
include_external:bool=False,
ignore:set[str]={},
ignore_type:set[type]={},
):
...
threshold: the maximum number of elements to print in a list, tuple, dict, etc.include_self: in a method call, whether to print the members ofself.include_private: If true, private variables and members whose names start with "__" are excluded from the trace.include_external: if false (default), include assignments only if the code is under the current directory.ignore: A set of strings. Variables and members matching any of the names are excluded from the trace.ignore_type: A set of types. Variables and members matching any of the types are excluded from the trace.
License
MIT
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
fattrace-0.0.4.tar.gz
(5.6 kB
view details)
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 fattrace-0.0.4.tar.gz.
File metadata
- Download URL: fattrace-0.0.4.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5f1ede03fec3ccee7fd4329fa4299cd17f55cc047917319feecf9cee7a117f52
|
|
| MD5 |
f0b4346aeed55378503e70de47a5c483
|
|
| BLAKE2b-256 |
28cc39be3e87b6d15dd54b4eee142070b5148ada183e18e92d7ca67831729bde
|
File details
Details for the file fattrace-0.0.4-py3-none-any.whl.
File metadata
- Download URL: fattrace-0.0.4-py3-none-any.whl
- Upload date:
- Size: 5.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
afb6ec6d100323169584a20831cb3fdbc02de53ae260f129239ad13b47738d80
|
|
| MD5 |
bc8c7eacf8b1798a81c1717fd8bf9451
|
|
| BLAKE2b-256 |
ca03c23bb043f8189d495710453962744c0a7b3a239599532bf5396e4ed9c3cc
|