Cross-platform python library, smart printer for console applications.
Project description
smartprinter v0.4.0
Cross-platform python library, smart printer for console applications.
smartprinter - Cross-platform python library, smart printer for console applications.
Has several different objects for displaying to the console or generating a string:
- Normal output.
- Output with the ability to change the line color .
- Displaying a message inside the pager, with the ability to scroll up and down, exit the pager, and print the message after being shown in a pager.
- output with the ability to print a message in the center of the console, regardless of changes in its width, indented before and after the message, indented with the specified characters.
⚠️ Disclaimer
By using this software, you agree to the full disclaimer terms.
Summary: Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md
Help
Install and use:
pip install -r requirements.txt- for tests:
pip install requirements/requirements-dev.txt - for test coverage:
pytest --cov --cov-report=html
Use:
pip3 install smartprinter
from smartprinter.printers import Printer, PrintersFactory
printer = Printer()
printer.base.echo('Text')
printer.click.echo('Text', show=True, color='green')
printer.smart.echo('Text', show=True, char='*')
printer.pager.echo('Text', show=True)
def_printer = PrintersFactory.get_base()
click_printer = PrintersFactory.get_click()
smart_printer = PrintersFactory.get_smart()
pager = PrintersFactory.get_pager()
or
from smartprinter.printers import Printer
printer = Printer()
Printer.base.echo('Text')
Printer.click.echo('Text', show=True, color='green')
Printer.smart.echo('Text', show=True, char='*')
Printer.pager.echo('Text', show=True)
Coverage
License
Copyright (©) 2026, Alexander Suvorov
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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 smartprinter-0.4.0.tar.gz.
File metadata
- Download URL: smartprinter-0.4.0.tar.gz
- Upload date:
- Size: 5.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
66b20cbe0d57abf2f3f7089352b3f6dacb579e1f1d8606c4ea37b7b8cb898ede
|
|
| MD5 |
62fa96fc4aec584d4469bceac8aa92d8
|
|
| BLAKE2b-256 |
ae5a5e5a5852ae5299a425ea6042f61470bb59c4c42f2907159ed21b59512efc
|
File details
Details for the file smartprinter-0.4.0-py3-none-any.whl.
File metadata
- Download URL: smartprinter-0.4.0-py3-none-any.whl
- Upload date:
- Size: 5.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c372d2619a5034904e35185bbc3bc22b5b3c58c6737ec3e0184c3f98c7ad1107
|
|
| MD5 |
ff158e9e69cf5f2366526157182c11ea
|
|
| BLAKE2b-256 |
f916bfae97a06c274707327d849c8e811e27eff0272733a2b8e55bf6e2e8be0a
|