Python library to improve console printing by adding context to your prints. It makes your console much cleaner, and you won't have to worry about making your prints beautiful.
Installation:
pip install context_printer
Basic usage example:
from context_printer import ContextPrinter as Ctp
Ctp.enter_section('Main section', color='blue')
Ctp.print('Text in main section')
for i in range(3):
Ctp.enter_section('Subsection {}'.format(i + 1))
Ctp.print('Text in subsection')
Ctp.print('Text in subsection')
Ctp.exit_section()
Ctp.exit_section()
The above example will print the following:
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
context_printer-1.3.0.tar.gz
(4.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file context_printer-1.3.0.tar.gz.
File metadata
- Download URL: context_printer-1.3.0.tar.gz
- Upload date:
- Size: 4.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
440579f8f63690cd25456fc5f3fe5497a63a01830dc26784c74f1a2e86c635dc
|
|
| MD5 |
2412861b401d45a8defb4df845c95b14
|
|
| BLAKE2b-256 |
cd3bd34947aeaebe5db0013813bb3effd4d42db7d5bdcd90690f87764a05607a
|
File details
Details for the file context_printer-1.3.0-py3-none-any.whl.
File metadata
- Download URL: context_printer-1.3.0-py3-none-any.whl
- Upload date:
- Size: 6.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bddad816b6244fafb507b6cbd1698869de697d8d855ca49fc1b422d8675052bb
|
|
| MD5 |
dbaa8ba21cd6b6875191ee72cd0be4d2
|
|
| BLAKE2b-256 |
d83ac7451140b50afd23320f67bd8964ae8d2f67a7a8a291a5019bdf1681d344
|