takes bit more code the file in example - implements these steps by arranging calls to the appropriate python api tools example - pp \integrate\embed\pyclass\objects #include #include main(/run objects with low-level calls *char *arg ="sir"*arg ="robin"*cstrpyobject *pmod*pclass*pargs*pinst*pmeth*pres/instance module klass(*py_initialize()pmod pyimport_importmodule("module")pclass pyobject_getattrstring(pmod"klass")py_decref(pmod)pargs py_buildvalue("()")pinst pyeval_callobject(pclasspargs)py_decref(pclass)py_decref(pargs)/fetch module */fetch module class */call class(*/result instance method( , *pmeth pyobject_getattrstring(pinst"method")/fetch bound method *py_decref(pinst)pargs py_buildvalue("(ss)"arg arg )/convert to python *pres pyeval_callobject(pmethpargs)/call method( , *py_decref(pmeth)py_decref(pargs)pyarg_parse(pres" "&cstr)printf("% \ "cstr)py_decref(pres)/convert to *step through this source file for more detailsit' mostly matter of figuring out how you would accomplish the task in pythonand then calling equivalent functions in the python api to build this source into executable programrun the makefile in this file' directory in the book examples package (it' analogous to makefiles we've already seenso we'll omit it hereafter compilingrun it as you would any other program/pp /integrate/embed/pyclass/objects brave sir robin this output might seem anticlimacticbut it actually reflects the return values sent back to by the python class method in file module py did lot of work to get this little string--it imported the modulefetched the classmade an instanceand fetched and called the instance method with tuple of argumentsperforming data conversions and python/ integration