Print Extended
Extended functionalists and better control over Python's built-in print function
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'
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)
| File | Size | Uploaded | |
|---|---|---|---|
| print_extended-0.2.0.tar.gz | 2.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| print_extended-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 6.9 kB
Release files / print_extended-0.2.0.tar.gz
| Download URL | print_extended-0.2.0.tar.gz |
|---|---|
| Size | 2.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6843d18c4cb79ca84ebd812591f87e3c5c8f763aa5e92b6b03774e5d43c2bee3
|
|
BLAKE2b-256 checksum How to use checksums |
6d2b6de49d543c97825ff011a3ee5c630189554fa7094ff390d899fa5a45e136
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|
Release files / print_extended-0.2.0-py3-none-any.whl
| Download URL | print_extended-0.2.0-py3-none-any.whl |
|---|---|
| Size | 4.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7880eadc2894d46b7da4d5baefadc69e4d458845c86a7ca80dbd545d190da75e
|
|
BLAKE2b-256 checksum How to use checksums |
efc119c71b0fbf4ad786af4887ef32a489bc69e405225c68a9f24d4da5ef1cb1
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.1
|