Package jazzparser :: Package utils :: Module output
[hide private]
[frames] | no frames]

Module output

source code

Command-line output printing utilities.

Utilities for formatting output to be printed to the command line.


Author: Mark Granroth-Wilding <mark.granroth-wilding@ed.ac.uk>

Functions [hide private]
 
confusion_matrix(matrix)
Given a confusion matrix as a dictionary, outputs it as a table.
source code
 
init_colors(**kwargs)
Initializes colorama - terminal output color package.
source code
 
deinit_colors()
De-initializes colorama.
source code
 
remove_ansi_colors(string)
Strip all ANSI color commands from the string.
source code
Variables [hide private]
  __colorama_inited = False
  __COLORAMA_PARAMS = {'autoreset': True, 'convert': None, 'stri...
  __package__ = None
hash(x)
Function Details [hide private]

confusion_matrix(matrix)

source code 

Given a confusion matrix as a dictionary, outputs it as a table.

The matrix should be in the format of a dictionary, keyed by correct values (strings), containing dictionaries, keyed by incorrect values (string), of integers. The integers represent the number of times the incorrect value was mistaken for the correct value.

init_colors(**kwargs)

source code 

Initializes colorama - terminal output color package. Only initializes it once. If called more than once, does nothing after the first time.

Use kwargs to override colorama init params.

deinit_colors()

source code 

De-initializes colorama. See the colorama docs for why you'd want to do this. Only does anything if colorama has been inited using init_colors.

See Also: http://pypi.python.org/pypi/colorama


Variables Details [hide private]

__COLORAMA_PARAMS

Value:
{'autoreset': True, 'convert': None, 'strip': None, 'wrap': True}