Prefix stdout/stderr lines with call stack context.
Project description
yprint
yprint prefixes stdout/stderr lines with a colored call stack breadcrumb. It does this by preloading a small C shim that intercepts writes and lets the Python runtime update a per-thread prefix.
Install
pip install yprint
Usage
yprint -- python your_script.py
yprint -- bash -c 'python your_script.py'
Options
--only PATH(repeatable): Only show frames under the given path(s).--prefix-width N: Fixed width for the prefix column.
Environment
YPRINT_ONLY: Colon-separated list of allowed paths (same as--only).YPRINT_PREFIX_WIDTH: Fixed width for the prefix column.YPRINT_COLOR:alwaysorneverto force color on/off.YPRINT_CACHE_DIR: Override where the preload library is compiled.YPRINT_ENABLE: Set to1to auto-enable viasitecustomize.
yprint compiles the preload library on first run; a C compiler (cc) must be available.
Dev / Release
pip install -e ".[dev]"
python -m build
python -m twine upload dist/*
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 yprint-0.1.1.tar.gz.
File metadata
- Download URL: yprint-0.1.1.tar.gz
- Upload date:
- Size: 9.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b790514588c3dc19b6a365966cd006a2191e001f93e6a291fa50b0ced77648fc
|
|
| MD5 |
86d8c31ae0c781bd35fdb6fd86201101
|
|
| BLAKE2b-256 |
88e8a81a5a0c2a7a806a701ef65c016515a71c70d2c64c0523ae87830999067e
|
Provenance
The following attestation bundles were made for yprint-0.1.1.tar.gz:
Publisher:
workflow.yaml on yieldthought/yprint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yprint-0.1.1.tar.gz -
Subject digest:
b790514588c3dc19b6a365966cd006a2191e001f93e6a291fa50b0ced77648fc - Sigstore transparency entry: 836535684
- Sigstore integration time:
-
Permalink:
yieldthought/yprint@c977ba93eb02108e31e254776106ab32f975cbc7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/yieldthought
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yaml@c977ba93eb02108e31e254776106ab32f975cbc7 -
Trigger Event:
push
-
Statement type:
File details
Details for the file yprint-0.1.1-py3-none-any.whl.
File metadata
- Download URL: yprint-0.1.1-py3-none-any.whl
- Upload date:
- Size: 10.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fd3d4395126c82823ab5fb5877f19e37d0460a0fd7a18696bb952e55fc1db02b
|
|
| MD5 |
159064f65a2552577d48bc7ace7bd2f8
|
|
| BLAKE2b-256 |
328e40ea86889b240f75ae44adff523d224a12f1670cdd29741be9814e5398d7
|
Provenance
The following attestation bundles were made for yprint-0.1.1-py3-none-any.whl:
Publisher:
workflow.yaml on yieldthought/yprint
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
yprint-0.1.1-py3-none-any.whl -
Subject digest:
fd3d4395126c82823ab5fb5877f19e37d0460a0fd7a18696bb952e55fc1db02b - Sigstore transparency entry: 836535689
- Sigstore integration time:
-
Permalink:
yieldthought/yprint@c977ba93eb02108e31e254776106ab32f975cbc7 -
Branch / Tag:
refs/tags/v0.1.1 - Owner: https://github.com/yieldthought
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
workflow.yaml@c977ba93eb02108e31e254776106ab32f975cbc7 -
Trigger Event:
push
-
Statement type: