print9
An upgraded, drop-in replacement for Python's print.
- New functionalities:
wrap,color. - Fully compatible with all existing
print()kwargs (sep,end,file,flush).
Installation
pip install print9
Quick start
from print9 import print9
# Use both wrap and color
print9("Hello, world!", wrap=80, color="blue")
New Parameters
- wrap: Optional[int]
- Max line width to wrap each object's text.
- If
Noneor<= 0, wrapping is disabled. - Example:
wrap=40wraps long lines at 40 characters.
- color: Optional[str]
- Color for each object's text.
- Accepts predefined names or a custom ANSI escape code.
- If
None, no color is applied.
Predefined color names
black, red, green, yellow, blue, magenta, cyan, white, orange, purple, pink, brown, gray.
Examples
from print9 import print9
# Wrap long text
long_text = """
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
""".strip()
print9(long_text, wrap=50)
# Use a predefined color
print9("Success!", color="green")
# Use a custom ANSI color (e.g., bright blue)
print9("Custom color", color="\x1b[94m")
# Combine multiple objects and forward kwargs to print()
print9("A", "B", "C", wrap=None, color=None, sep=" | ", end="\n\n")
Notes
- Wrapping applies per object after converting it to a string.
- Coloring wraps each object's text with the chosen color and a reset code.
- All other keyword arguments are passed directly to Python's built-in
print().
License
MIT License 2025 Vincent de Neuf. See LICENSE for details.
Metadata
Release files for print9 0.1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| print9-0.1.6.tar.gz | 4.2 kB | Without provenance | Details for print9-0.1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| print9-0.1.6-py3-none-any.whl | Python 3 | none | any | Details for print9-0.1.6-py3-none-any.whl |
Total release size: 8.5 kB
Release files / print9-0.1.6.tar.gz
| Download URL | print9-0.1.6.tar.gz |
|---|---|
| Size | 4.2 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
eb99f6ed1bdf4756b2742aa092d9cf604bbe742e4fd365beb4c86585ae39bf4d
|
|
BLAKE2b-256 checksum How to use checksums |
b1715f5342796ed0886226c21dd950d391e7174a14d3aba1c699ca3595c8ad8f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Release files / print9-0.1.6-py3-none-any.whl
| Download URL | print9-0.1.6-py3-none-any.whl |
|---|---|
| Size | 4.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
618a4ea118a2e7c206e173d4fa21e7c1710b4ff9a70da9a1d7218b59465f71dd
|
|
BLAKE2b-256 checksum How to use checksums |
5906fb11427eed79da45b2cd220fe8bb668af7ef185f46f3bdc8d916b55d6ad0
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.9
|
Security for print9 0.1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.