Skip to content

smartlegionlab/smartprinter

Repository files navigation

smartprinter v0.4.1

Cross-platform python library, smart printer for console applications.


Platform GitHub release (latest by date) GitHub top language GitHub GitHub stars GitHub forks PyPI PyPI - Downloads PyPI Downloads PyPI - Format


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

logo


License

BSD 3-Clause License

Copyright (©) 2026, Alexander Suvorov

Packages

 
 
 

Contributors

Languages