lineup
lineup is a lightweight Python utility that globally formats and prints detailed tracebacks for all exceptions — both uncaught and handled. It's a powerful debugging tool to help you better understand error behavior across your codebase.
Features
- Clean, readable formatting of Python tracebacks
- Captures all exceptions, even those caught in
tryblocks - Automatically activates for both the main thread and additional threads
- Simple one-line activation
Installation
pip install lineup
Usage
Call detail() early in your script or application:
from lineup import detail
detail()
Once active, all exceptions—whether caught or uncaught—will be printed in a readable format:
Traceback (most recent call last):
File "example.py", line 10, in my_function
result = 1 / 0
ZeroDivisionError: division by zero
This includes exceptions inside try/except blocks, providing visibility into all error events.
Example
from lineup import detail
detail()
def foo():
try:
raise ValueError("Oops!")
except ValueError:
pass # This would still be printed thanks to `lineup`
foo()
Output:
Traceback (most recent call last):
File "example.py", line 6, in foo
raise ValueError("Oops!")
ValueError: Oops!
How It Works
- Overrides
sys.excepthookto format uncaught exceptions. - Uses
sys.setprofileandthreading.setprofileto monitor all raised exceptions, even insidetry/except. - Ignores
KeyboardInterruptandSystemExitto avoid clutter during normal exits.
When to Use
- During development and debugging
- When you want full visibility into exception flow
- In multi-threaded applications where tracebacks can be hard to track
⚠️ This tool is not recommended for production environments where performance or clean logs are critical.
License
MIT License
Metadata
Release files for lineup 0.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| lineup-0.0.2.tar.gz | 3.6 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| lineup-0.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.4 kB
Release files / lineup-0.0.2.tar.gz
| Download URL | lineup-0.0.2.tar.gz |
|---|---|
| Size | 3.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b4826fcbbc7b7b14606a6ca79361ee9358ac3dcaf5357518af1a3a2f9a6f5d8b
|
|
BLAKE2b-256 checksum How to use checksums |
0fc3c27559ad270f92079a7fc0777627b1a6e8b834e02b048539f88f65fb7077
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|
Release files / lineup-0.0.2-py3-none-any.whl
| Download URL | lineup-0.0.2-py3-none-any.whl |
|---|---|
| Size | 3.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3a1ff9cdf1cd42480a4119f07c84b542b5980d00b8d0ab461dd02275506ae3c1
|
|
BLAKE2b-256 checksum How to use checksums |
6764915d0a7c558a9fab3b7d0fd46317a979b48f4b5b6bd8629f652e8286d545
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.13.3
|