pres pyeval_callobject(pmethpargs)py_decref(pmeth)py_decref(pargs)if (pres =nullerror("error calling klass method")if (!pyarg_parse(pres" "&cstr)error("can' convert klass method result")printf("% \ "cstr)py_decref(pres)/call method( , */convert to *these lines of code (not counting its makefileachieve the same results as the lines of interactive python we ran earlier--not exactly stellar result from developer productivity perspectiveneverthelessthe model it uses allows and +to leverage python in the same way that python can employ and +as 'll discuss in this book' conclusion in momentsuch combinations can often be more powerful than their individual parts other integration topics in this the term integration has largely meant mixing python with components written in or +(or other -compatible languagesin extending and embedding modes but from broader perspectiveintegration also includes any other technology that lets us mix python components into largerheterogeneous systems to wrap up this this last section briefly summarizes handful of commonly used integration technologies beyond the api tools we've explored jythonjava integration we first met jython in and it was discussed earlier in this in the context of extending reallythoughjython is broader integration platform jython compiles python code to java bytecode for execution on the jvm the resulting java-based system directly supports two kinds of integrationextendingjython uses java' reflection api to allow python programs to call out to java class libraries automatically the java reflection api provides java type information at runtime and serves the same purpose as the glue code we've generated to plug libraries into python in this part of the book in jythonhoweverthis runtime type information allows largely automated resolution of java calls in python scripts--no glue code has to be written or generated embeddingjython also provides java pythoninterpreter class api that allows java programs to run python code in namespacemuch like the api tools we've used to run python code strings from programs in additionbecause jython implements all python objects as instances of java pyobject classit is straightforward for the java layer that encloses embedded python code to process python objects python/ integration