Skip to content

gitter-badger/RichConsole

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

RichConsole.py Unlicensed work

TravisCI Build Status PyPi Status Coveralls Coverage Libraries.io Status

This is a tool to output "poor" (because it is limited by standardized control codes) rich text into console.

You create a tree structure where each piece of string has its own stylesheet. After you have finished forming the output message you convert it into a string. The library does the rest.

How does it work?

The algorithm is damn simple: it just traverses the tree in depth-first way, determines exact style of each string, computes differences between them and emits control codes to apply them.

Requirements

  • Python 3. Python 2 is dead, stop raping its corpse. Use 2to3 with manual postprocessing to migrate incompatible code to 3. It shouldn't take so much time. For unit-testing you need Python 3.6+ or PyPy3 because their dict is ordered.

Optional requirements

This library automatically imports colors and other control codes from the following libraries:

About

A library to input rich text into console

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages