Show EOL distros:
rocon_tools: rocon_console | rocon_ebnf | rocon_interactions | rocon_launch | rocon_master_info | rocon_python_comms | rocon_python_redis | rocon_python_utils | rocon_python_wifi | rocon_semantic_version | rocon_uri
Package Summary
Released
Documented
Command line python console utilities (mostly for colourisation).
- Maintainer status: developed
- Maintainer: Daniel Stonier <d.stonier AT gmail DOT com>
- Author: Daniel Stonier <d.stonier AT gmail DOT com>
- License: BSD
- Bug / feature tracker: https://github.com/robotics-in-concert/rocon_tools/issues
- Source: git https://github.com/robotics-in-concert/rocon_tools.git (branch: release/0.1-indigo)
Overview
This package provides definitions and methods that enable simple colouring for output on the console without having to remember all the specific keycodes that shells use.
Colour Definitions
The current list of supported colour definitions:
Regular: black, red, green, yellow, blue, magenta, cyan, white,
Bold: bold, bold_black, bold_red, bold_green, bold_yellow, bold_blue, bold_magenta, bold_cyan, bold_white
Usage
Freeform Style
Simply intersperse colour definitions throughout your printing statements, e.g.
Toggle line numbers
1 import rocon_console.console as console
2 print(console.cyan + " Name" + console.reset + ": " + console.yellow + "Dude" + console.reset)
Logging Style
Toggle line numbers
1 import rocon_console.console as console
2 logdebug("the ingredients of beer are interesting, but not important to the consumer")
3 loginfo("the name of a beer is useful information")
4 logwarn("this is a lite beer")
5 logerror("this is a budweiser")
6 logfatal("this is mereley a cider")