All manifest constants defined in laygodef.h are defined with the same names and values in Laygo.py. Therefore they can be used in Python in exactly the way they are documented for the C language API. For instance, the C code:
if (state == lgo_STATE_DATA_TRANSFER_XON) { ConnectNotify(); } else if (state == lgo_STATE_WAITING_FOR_REMOTE_CONFIRMATION) { DisconnectNotify(); } else if (state == lgo_STATE_OPEN) { OpenNotify(); }
can be written in Python as:
if (state == Laygo.STATE_DATA_TRANSFER_XON): ConnectNotify() elif (state == Laygo.STATE_WAITING_FOR_REMOTE_CONFIRMATION) DisconnectNotify() elif (state == Laygo.STATE_OPEN) OpenNotify()