Table Of Contents

Previous topic

base.config

Next topic

base.externals

This content refers to the previous stable release of PyMVPA. Please visit www.pymvpa.org for the most recent version of PyMVPA and its documentation.

base.dochelpers

Module: base.dochelpers

Various helpers to improve docstrings and textual output

Functions

mvpa.base.dochelpers.enhancedDocString(item, *args, **kwargs)

Generate enhanced doc strings for various items.

Parameters:
  • item (basestring or class) – What object requires enhancing of documentation
  • *args (list) – Includes base classes to look for parameters, as well, first item must be a dictionary of locals if item is given by a string
  • force_extend (bool) – Either to force looking for the documentation in the parents. By default force_extend = False, and lookup happens only if kwargs is one of the arguments to the respective function (e.g. item.__init__)
  • skip_params (list of basestring) – List of parameters (in addition to [kwargs]) which should not be added to the documentation of the class.

It is to be used from a collector, ie whenever class is already created

mvpa.base.dochelpers.handleDocString(text, polite=True)

Take care of empty and non existing doc strings.

mvpa.base.dochelpers.rstUnderline(text, markup)

Add and underline RsT string matching the length of the given string.

mvpa.base.dochelpers.singleOrPlural(single, plural, n)

Little helper to spit out single or plural version of a word.

mvpa.base.dochelpers.table2string(table, out=None)

Given list of lists figure out their common widths and print to out

Parameters:
  • table (list of lists of strings) – What is aimed to be printed
  • out (None or stream) – Where to print. If None – will print and return string
Return type:

string if out was None