enrich
Project description
enrich
Enriched extends rich library functionality with a set of changes that were not accepted to rich itself.
Console with redirect support
Our Console class adds one additional option to rich.Console in order to
redirect sys.stdout
and sys.stderr
streams using a FileProxy.
from enrich.console import Console
import sys
console = Console(
redirect=True, # <-- not supported by rich.cosole.Console
record=True)
sys.write("foo")
# this assert would have passed without redirect=True
assert console.export_text() == "foo"
Console with implicit soft wrapping
If you want to produce fluid terminal output, one where the client terminal decides where to wrap the text instead of the application, you can now tell the Console constructor the soft_wrap preference.
from enrich.console import Console
import sys
console = Console(soft_wrap=True)
console.print(...) # no longer need to pass soft_wrap to each print
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
enrich-1.0.tar.gz
(11.6 kB
view details)
Built Distribution
enrich-1.0-py3-none-any.whl
(4.9 kB
view details)
File details
Details for the file enrich-1.0.tar.gz
.
File metadata
- Download URL: enrich-1.0.tar.gz
- Upload date:
- Size: 11.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4e63d9c0e60f9170b5491639f5749f6c495f2bd504ca8d8c2640b402b2bff81 |
|
MD5 | 2445f25311253ace8ac178902de2fba6 |
|
BLAKE2b-256 | a09b86919b182de3c775e3776363cbbb7afdb4357a2a6f36a463b4fd155470a5 |
File details
Details for the file enrich-1.0-py3-none-any.whl
.
File metadata
- Download URL: enrich-1.0-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.1 requests/2.25.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.51.0 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 59b4752ac0891abac3cd10879242cf7725c757c617a674f3b101483874e6a767 |
|
MD5 | 1d2795a832e248607d46e623d6bc459a |
|
BLAKE2b-256 | f7ffd72259dc603290b56e73fd5c61d700621235bbbf9973785bbf79baa7c9ab |