def generatePythonWrapper(classMap):
    """Returns the text of a function 'createPythonInterface'"""
    outBuffer = StringIO.StringIO()
    lineWriter = lambda line: outBuffer.write(("        " + line).rstrip() + "\n")

    outBuffer.write(headerText + "\n")



    for className, classObj in classMap.iteritems():
        generatePythonWrapperForClass(
            lambda line: outBuffer.write(line.rstrip() + "\n"),
            className,
            classObj
            )

    outBuffer.write("\nclasses = {\n")
    for className, classObj in classMap.iteritems():
        outBuffer.write((className, className) % "    '%s': %s,\n")
    outBuffer.write("    }\n")

    # outBuffer.write("\nmodule.exports = SubscribableWebObjects if module?\n")

    return outBuffer.getvalue()
dataset/ETHPy150Open ufora/ufora/ufora/BackendGateway/SubscribableWebObjects/generatePythonWrapper.py/generatePythonWrapper/swapped operands of `%`