printplus
Simple package to print text to terminal with colors and alignment
Classes Available:
-
PrintPlusMethods in the class:
-
text( message : str)
Add text to print, can be called multiple times to add text to previous message -
red()
Adds red color to text added before the call which does not already have color -
green()
Adds green color to text added before the call which does not already have color -
blue()
Adds blue color to text added before the call which does not already have color -
yellow()
Adds yellow color to text added before the call which does not already have color -
violet()
Adds violet color to text added before the call which does not already have color -
bold()
Makes all the text added before the call bold -
highlight()
Highlights all the texts, even those added after the call -
underline()
Underkines all the texts, even those added after the call -
blanks( char : chr)
Specify with what char to spill the blanks. By default it will be filled by spaces -
show()
Prints the constructed text and clears all the values stored -
center() and right()
Aligns the text as specified, the one thats called latest will be applied -
end()
Sepcify the end char of text, by default it will be \n , the one thats called latest will be applied -
getColored(message:str,color:str)
Returns colored string to use in other methods, the argument color can be one of:
- PrintPlus().colors['RED']
- PrintPlus().colors['GREEN']
- PrintPlus().colors['VIOLET']
- PrintPlus().colors['BLUE']
- PrintPlus().colors['YELLOW']
- PrintPlus().colors['BOLD']
- PrintPlus().colors['UNDERLINE']
- PrintPlus().colors['HIGHLIGHT']
-
Usage:
from printplus import PrintPlus
printer = PrintPlus()
printer.text('Hello').green().text('World!!').red().underline().text(' by printplus').yellow().center().bold().show()
Try:
pip3 install printplus
Metadata
Release files for printplus 1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| printplus-1.tar.gz | 2.9 kB | Details |
Release files / printplus-1.tar.gz
| Download URL | printplus-1.tar.gz |
|---|---|
| Size | 2.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8c8e05133cce29c7286d1ca00639670c161e32adade05d165d989360711c263a
|
|
BLAKE2b-256 checksum How to use checksums |
bb9f192b3cd9844efbd211f49b745906fffe055be1bef6d36174399312c35855
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.0
|