mavnt / with_colors

Wrapper for python module colorama.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

with_colors

Wrapper for python module colorama.

asciicast

with colorama:

from colorama import Fore, Back, Style

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

with with_colors:

from with_colors import *

with color(red):
    print('some red text')
    with background(green):
        print('and a green background')
        with style(dim):
            print('and in dim text')
print('back to normal now')

About

Wrapper for python module colorama.

License:MIT License


Languages

Language:Python 100.0%