pdict pydict_new()if (pdict =nullreturn - pydict_setitemstring(pdict"__builtins__"pyeval_getbuiltins())/precompile strings of code to bytecode objects *pcode py_compilestring(codestr ""py_file_input)pcode py_compilestring(codestr ""py_eval_input)pcode py_compilestring(codestr ""py_file_input)/run compiled bytecode in namespace dict *if (pcode &pcode &pcode (voidpyeval_evalcode((pycodeobject *)pcode pdictpdict)presult pyeval_evalcode((pycodeobject *)pcode pdictpdict)pyarg_parse(presult" "&cval)printf("% \ "cval)py_decref(presult)/rerun code object repeatedly *for ( < ++pydict_setitemstring(pdict" "pylong_fromlong( ))(voidpyeval_evalcode((pycodeobject *)pcode pdictpdict)printf("\ ")/free referenced objects *py_xdecref(pdict)py_xdecref(pcode )py_xdecref(pcode )py_xdecref(pcode )py_finalize()this program combines variety of techniques that we've already seen the namespace in which the compiled code strings runfor instanceis newly created dictionary (not an existing module object)and inputs for code strings are passed as preset variables in the namespace when built and executedthe first part of the output is similar to previous examples in this sectionbut the last line represents running the same precompiled code string times/pp /integrate/embed/basicsembed-bytecode embed-bytecode the meaning of life the meaning of python : : : : : : : : : : : if your system executes python code strings multiple timesit is major speedup to precompile to bytecode in this fashion this step is not required in other contexts that invoke callable python objects--including the common embedding use case presented in the next section basic embedding techniques