A collection of functions, decorators and data that don't seem to fit into any of my (or anybody else's) libraries.
autolog(message, level=logging.DEBUG)
enum(**enums)
ip2long(ip)
long2ip(long)
to_dict(o, limit=None)
walker(node, limit=None)
- STATES (dict)
- ORDERED_STATES (OrderedDict)
- TInterface (only for use with walker)
- Inherit your walkable nodes from
mrpython.TInterface
- Set the ``` _dict_attrs attribute on all of your nodes to limit the extent to which they walk
- Pass one of the nodes to
walker(node)
- Store the resulting dictionary.
If you want to override the _dict_attrs
default limiting, call the to_dict
method on your starting node and supply the limit
parameter and then pass the resulting dictionary to the walker(node)
function.