module documentation

Module for reading, writing and manipulating Toolbox databases and settings files.

Class StandardFormat Class for reading and processing standard format marker files and strings.
Class ToolboxData No class docstring; 2/4 methods documented
Class ToolboxSettings This class is the base class for settings files.
Function add_blank_lines Add blank lines before all elements and subelements specified in blank_before.
Function add_default_fields Add blank elements and subelements specified in default_fields.
Function demo Undocumented
Function remove_blanks Remove all elements and subelements with no text and no child elements.
Function sort_fields Sort the elements and subelements in order specified in field_orders.
Function to_settings_string Undocumented
Function to_sfm_string Return a string with a standard format representation of the toolbox data in tree (tree can be a toolbox database or a single record).
Function _sort_fields sort the children of elem
Function _to_settings_string Undocumented
Variable _is_value Undocumented
def add_blank_lines(tree, blanks_before, blanks_between): (source)

Add blank lines before all elements and subelements specified in blank_before.

Parameters
treeUndocumented
blanks_beforeUndocumented
blanks_betweenUndocumented
elem:ElementTree._ElementInterfacetoolbox data in an elementtree structure
blank_before:dict(tuple)elements and subelements to add blank lines before
def add_default_fields(elem, default_fields): (source)

Add blank elements and subelements specified in default_fields.

Parameters
elem:ElementTree._ElementInterfacetoolbox data in an elementtree structure
default_fields:dict(tuple)fields to add to each type of element and subelement
def demo(): (source)

Undocumented

def remove_blanks(elem): (source)

Remove all elements and subelements with no text and no child elements.

Parameters
elem:ElementTree._ElementInterfacetoolbox data in an elementtree structure
def sort_fields(elem, field_orders): (source)

Sort the elements and subelements in order specified in field_orders.

Parameters
elem:ElementTree._ElementInterfacetoolbox data in an elementtree structure
field_orders:dict(tuple)order of fields for each type of element and subelement
def to_settings_string(tree, encoding=None, errors='strict', unicode_fields=None): (source)

Undocumented

def to_sfm_string(tree, encoding=None, errors='strict', unicode_fields=None): (source)

Return a string with a standard format representation of the toolbox data in tree (tree can be a toolbox database or a single record).

Parameters
tree:ElementTree._ElementInterfaceflat representation of toolbox data (whole database or single record)
encoding:strName of an encoding to use.
errors:strError handling scheme for codec. Same as the encode() builtin string method.
unicode_fields:dict(str) or set(str)
Returns
strUndocumented
def _sort_fields(elem, orders_dicts): (source)

sort the children of elem

def _to_settings_string(node, l, **kwargs): (source)

Undocumented

_is_value = (source)

Undocumented