finesse.utilities.misc

Miscellaneous utility functions for any part of Finesse.

Functions

calltracker(func)

Decorator used for keeping track of whether the current state is inside the decorated function or not.

check_name(name)

Checks the validity of a component or node name.

doc_element_parameter_table(cls)

Prints table for a particular element class.

find(x, value)

Finds value in the list x and returns its index, returning None if value is not in the list.

find_nearest(x, value[, index])

graph_layouts()

Available NetworkX and graphviz (if installed) graph plotting layouts.

graphviz_layouts()

Available graphviz graph plotting layouts.

is_iterable(obj)

Reliable check for whether an object is iterable.

networkx_layouts()

Available NetworkX graph plotting layouts.

opened_file(filename, mode)

Get an open file regardless of whether a string or an already open file is passed.

pairwise(iterable)

Iterates through each pair in a iterable.

reduce_getattr(obj, key[, delimiter])

Applies a nested getattr with reduce to select an attribute of a nested object within obj.

valid_name(name)

Validate the specified name.