python equivalent pyobject_getattrstring getattr(objattrpyobject_setattrstring setattr(objattrvalpyobject_callobject funcobj(*argstuplepyeval_callobject funcobj(*argstuplepyrun_string eval(exprstr)exec(stmtstrpyrun_file exec(open(filename(read()because embedding relies on api call selectionbecoming familiar with the python api is fundamental to the embedding task this presents handful of representative embedding examples and discusses common api callsbut it does not provide comprehensive list of all tools in the api once you've mastered the examples hereyou'll probably need to consult python' integration manuals for more details on available calls in this domain as mentioned previouslypython offers two standard manuals for / +integration programmersextending and embeddingan integration tutorialand python/ apithe python runtime library reference you can find the most recent releases of these manuals at possibly installed on your computer alongside python itself beyond this these manuals are likely to be your best resource for up-to-date and complete python api tool information what is embedded codebefore we jump into detailslet' get handle on some of the core ideas in the embedding domain when this book speaks of "embeddedpython codeit simply means any python program structure that can be executed from with direct in-process function call interface generally speakingembedded python code can take variety of formscode strings programs can represent python programs as character strings and run them as either expressions or statements (much like using the eval and exec built-in functions in pythoncallable objects programs can load or reference python callable objects such as functionsmethodsand classesand call them with argument list objects (much like func(*pargs*kargspython syntaxcode files programs can execute entire python program files by importing modules and running script files through the api or general system calls ( popen python/ integration