FLAME  devel
 All Classes Functions Variables Typedefs Enumerations Pages
Python API reference

The Python API exposes a limited sub-set of the C++ API with the 'flame' python module.

from flame import Machine, GLPSPrinter, GLPSParser

Machine

See the doc strings for more information.

class Machine(object):
def __init__(self, config, path=None, extra=None):
pass
def conf(self, index=None):
pass
def allocState(self, config=None, inherit=False):
"returns State"
def propagate(self, state, start=0, max=-1, observe=None):
pass
def reconfigure(self, index, config):
pass
def find(self, name=None, type=None):
pass
def __len__(self):
pass

A python Machine is constructed by passing in a file-like object, buffer, or dictionary.

State

This python type wraps an instance of a sub-class of StateBase. The StateBase::getArray() interface is used to find those member variables exported by the sub-class and expose them as python attributes.

Different sub-classes will export different member variables.