A quick way to customize your Tracebacks
Project description
customTraceback
A quick and easy way to customize your Python tracebacks
import customTraceback
def myTraceback(name, value, tb, line):
print(f"🔥 Exception: {name}") # name: name of the exception
print(f"💬 {value}") # value: Value (description) of the exception
print(f"📜 Trace: {tb}") # tb: Traceback (default traceback without colors)
print(f"📄 At Line: {line}" # line: the line number (string)
customTraceback.setTraceBack(myTraceback)
1 / 0
This replaces any Exception with a custom traceback, but in this example, it raises zerodevisionerror
This is a basic example this package is a fun package to make cool tracebacks
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
customtraceback-0.8.0.tar.gz
(2.1 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 customtraceback-0.8.0.tar.gz.
File metadata
- Download URL: customtraceback-0.8.0.tar.gz
- Upload date:
- Size: 2.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d8da579aa37cd091220a807e08ca0e6c3aec0405d5a9db97e58a127bd5e2034
|
|
| MD5 |
0579022eff3275448e35f402d58aefe0
|
|
| BLAKE2b-256 |
5f3036a838f72efc8c7d772e145a9ac150ec5102e6b09f28ed1b657debffb7a5
|
File details
Details for the file customtraceback-0.8.0-py3-none-any.whl.
File metadata
- Download URL: customtraceback-0.8.0-py3-none-any.whl
- Upload date:
- Size: 2.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
161c3ca9fd588332a005f1ce7009d5600b0fe0133854dfa3bbc957d0b7d4f2b4
|
|
| MD5 |
f3256335b19ab115df0f4a73b713c3d6
|
|
| BLAKE2b-256 |
72b190fb38fd22b47618e28a6cbc1cf141fd9484f2c2020ca19aa9935699df40
|