Smart text decorator
A library for decorating strings and displaying them beautifully in the console.
Smart Text Decorator — a library for decorating strings and displaying them beautifully in the console.
> Use for beautiful design of console applications.
pip install smarttextdecorator
Basic usage:
from smarttextdecorator import SmartPrinter SmartPrinter.print_framed(symbol='-') SmartPrinter.print_center(text='Smart Legion Lab')
Complete example:
from smarttextdecorator import SmartPrinter
def main():
SmartPrinter.show_head(text='Smart Legion Lab')
print()
SmartPrinter.print_framed(text='Hello World!!!')
print()
SmartPrinter.show_footer(
url='https://github.com/smartlegionlab/',
copyright_='Copyright © 2024, Alexander Suvorov. All rights reserved.'
)
if __name__ == '__main__':
main()
| Method | Description | Parameters |
|---|---|---|
print_framed | Display line with placeholder character at full console width | text='', symbol='-', width=None |
print_center | Display text centered in the console | text='', width=None |
show_head | Display formatted header with title | text='', symbol='-', width=None |
show_footer | Display formatted footer with URL and copyright | url='', copyright_='', symbol='-', width=None |
By using this software, you agree to the full disclaimer terms.
Software provided "AS IS" without warranty. You assume all risks.
Full legal disclaimer: See DISCLAIMER.md
License: BSD 3-Clause License