Package: printtools
PrintA newprintfunction to add new and exciting functionality.DependenciesPython3 (Python2 does not allow overloading of the print statement)PyFiglet (ASII art, anyone?)InstallationInstall withpipinstallprinttoolsFor the latest version, clone this repository and usepython3setup.pyinstallUsageThe first argument is the object to print; all other arguments are treated as modifiers. For example:>>> import printtools as pt
>>> pt.print("You can print normally")
You can print normally
>>> pt.print(12345678)
12345678
>>> pt.print("or with ASCII art", pt.SM)
                  _ _   _        _   ___  ___ ___ ___            _
 ___ _ _  __ __ _(_) |_| |_     /_\ / __|/ __|_ _|_ _|  __ _ _ _| |_
/ _ \ '_| \ V  V / |  _| ' \   / _ \\__ \ (__ | | | |  / _` | '_|  _|
\___/_|    \_/\_/|_|\__|_||_| /_/ \_\___/\___|___|___| \__,_|_|  \__|

>>> pt.print("you can combine attributes", pt.RED, pt.BLUE + pt.BG, pt.BOLD)
you can combine attributes

<this will be bold red on a blue background on supported systems>NOTE: since all other args are captured as formatting arguments, you cannot print multiple items at once as inprint(1, 2, 3).DividersThedivmodule can be used to create nice looking dividers:>>> div.div('-')
----------------------------------------- # stretches all the way across the terminal
>>> div.div('*', 'Example')
** Example ******************************
>>> div.div('= =', 'Example')
=========================================

                Example

=========================================Patterns include:single character: repeats that character across the screen. If a message is provided, two characters are displayed, followed by a space, the message, a space, then characters occupying the remainder of the screencharacter repeated, with spaces in between: draws two horizontal lines across the screens with that character; in between the two lines, the label text is drawn at the center. Blank lines equal to the number of spaces are added on top and below the label text.TablesUse thetablemodule to print out tables. Tables consist of two-dimensional arrays:>>> from print import table
>>> t = [["Entry 1", 0.0001, "Value 1"], ["Entry 2", 12345, "Value 2"]]
>>> table(t)
+-------+------+-------+
|Entry 1|0.0001|Value 1|
+-------+------+-------+
|Entry 2|12345 |Value 2|
+-------+------+-------+table(render=True)andrendercan be combined to add formatting:>>> from print import *
>>> t = [
	[pt.render("Entry 1", pt.RED), 0.0001, "Value 1"],
	[pt.render("Entry 2", pt.GREEN), 12345, "Value 2"]]
>>> print(pt.table(t, render=True), pt.BOLD)Custom ExceptionUse theRenderedExceptionclass to provide a more colorful base exception class.>>> class YouFuckedUpError(pt.RenderedException):
...    pass
...
>>> raise YouFuckedUpError("You've really fucked it up this time. Yeah you.")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
__main__.YouFuckedUpError:
__   __        ___        _          _ _   _      ___
\ \ / /__ _  _| __|  _ __| |_____ __| | | | |_ __| __|_ _ _ _ ___ _ _
 \ V / _ \ || | _| || / _| / / -_) _` | |_| | '_ \ _|| '_| '_/ _ \ '_|
  |_|\___/\_,_|_| \_,_\__|_\_\___\__,_|\___/| .__/___|_| |_| \___/_|
                                            |_|
You've really fucked it up this time. Yeah you.ConstantsAll constants are accessible withfrom print import *or by by callingprint.<CONST>.Basic formattingRESET=0BOLD=1FAINT=2ITALIC=3UNDERLINE=4REVERSE=7CONCEAL=8STRIKEOUT=9ColorsBLACK=30RED=31GREEN=32YELLOW=33BLUE=34MAGENTA=35CYAN=36WHITE=37ModifiersBRIGHT=60BR=60BACKGROUND=10BG=10BRIGHT/BR: use the brighter version of the color (not available on all terminals; your mileage may vary)BACKGROUND/BG: set the background color instead of the text colorFontsOnly these fonts are included as constants. Other Figlet fonts (see Figlet'swebsite) can be passed as a string argument.# Standard fontsSM="small"STD="standard"BIG="big"# Isometric fontsISO1="isometric1"ISO2="isometric2"ISO3="isometric3"ISO4="isometric4"# Other fontsSA="contessa"DOOM="doom"DP="drpepper"L3D="larry3d"SMISO="smisome1"KB="smkeyboard"SLANT="slant"SMSLANT="smslant"