dump(filename, *args, **kwargs) | Save a series of Python dictionary objects to XML file. |
flatten_result(f) | If return value is iterable and has only one element, just return this element. |
load(*args, **kwargs) |
Module to dump and load Python dictionaries to and from XML.
Save a series of Python dictionary objects to XML file.
Dictionaries provided as keyword arguments have their key stored as table header in the resulting XML file.
If return value is iterable and has only one element, just return this element. Otherwise return the iterable.
Intended to be used as a decorator. Example:
@flatten_result
def f(i):
return range(i)
returns only a single value if range has one number or list otherwise.