Python Tools and Libraries

Console Tools

colored - PyPi

colored - PyPi

Dependencies: None

Example

>>> from colored import fg, bg, attr
>>> print ('%s Hello World !!! %s' % (fg(1), attr(0)))
 Hello World !!!
>>> print ('%s%s Hello World !!! %s' % (fg(1), bg(15), attr(0)))
 Hello World !!!

colorama - PyPi

Dependencies: None

Example

Initialize:

from colorama import init
init()

Cross-platform printing of colored text using Colorama’s constant shorthand for ANSI escape sequences:

from colorama import Fore, Back, Style
print(Fore.RED + 'some red text')
print(Back.GREEN + 'and with a green background')
print(Style.DIM + 'and in dim text')
print(Style.RESET_ALL)
print('back to normal now')

Or by manually printing ANSI sequences:

print('\033[31m' + 'some red text')
print('\033[30m') # and reset to default color

More Libs

Comparing Python Command-Line Parsing Libraries – Argparse, Docopt, and Click

https://realpython.com/comparing-python-command-line-parsing-libraries-argparse-docopt-click/