Skip to main content

Print Extended

Extended functionalists and better control over Python's built-in print function

PyPI version Build Status

GitHub issues GitHub closed issues GitHub closed pull requests

PyPI - Python Version GitHub GitHub last commit

Installation

> pip install print-extended

Usage

If you run Python interpreter with -O flag print will be disabled (watches for debug):

python -O

>>> import print_extended
>>> print('foo')
>>>

Runing it without -O flag works normal:

python

>>> import print_extended
>>> print('foo')
foo
>>>

Control your print with PrintControl class:

import print_extended
from print_extended import PrintControl

PrintControl.template = '--> {print} <--'
PrintControl.fg_color = 'green'
PrintControl.bg_color = 'blue'

PrintControl

Change underlying print function:

import print_extended
from pprint import pprint
from print_extended import PrintControl

PrintControl.print_function = pprint

print({...}) # will print it using pprint

Disable and enable printing

import print_extended
from print_extended import PrintControl

PrintControl.disable() # print(...) now does nothing

PrintControl.enable() # print(...) now prints

Metadata

Release files for print-extended 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for print-extended 0.2.0
File Size Uploaded Provenance Actions
print_extended-0.2.0.tar.gz 2.8 kB Without provenance Details for print_extended-0.2.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for print-extended 0.2.0
File Interpreter ABI Platform Actions
print_extended-0.2.0-py3-none-any.whl Python 3 none any Details for print_extended-0.2.0-py3-none-any.whl

Total release size: 6.9 kB

Security for print-extended 0.2.0

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.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page