Extended functionalities and better control over Python's built-in print function
Project description
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
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
print_extended-0.2.0.tar.gz
(2.8 kB
view details)
Built Distribution
File details
Details for the file print_extended-0.2.0.tar.gz
.
File metadata
- Download URL: print_extended-0.2.0.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6843d18c4cb79ca84ebd812591f87e3c5c8f763aa5e92b6b03774e5d43c2bee3 |
|
MD5 | 81c069e0619fb64f36a9be4b6b686092 |
|
BLAKE2b-256 | 6d2b6de49d543c97825ff011a3ee5c630189554fa7094ff390d899fa5a45e136 |
File details
Details for the file print_extended-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: print_extended-0.2.0-py3-none-any.whl
- Upload date:
- Size: 4.2 kB
- Tags: Python 3
- Uploaded using 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
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7880eadc2894d46b7da4d5baefadc69e4d458845c86a7ca80dbd545d190da75e |
|
MD5 | d193a034bbd204018a11e8f890377046 |
|
BLAKE2b-256 | efc119c71b0fbf4ad786af4887ef32a489bc69e405225c68a9f24d4da5ef1cb1 |