Exemple #1
0
def compile_protocol_string(string):
    """Compile extprot protocol objects into python sourcecode.

    This function compiles the protocol definitions found in the given
    string, returning sourcecode for their corresponding python class
    definitions.
    """
    from extprot.compiler import ModuleCompiler
    mc = ModuleCompiler()
    mc.compile_string(string)
    return "\n".join(mc.code_lines)