How can I use a PyObject in C++?

lixinyi.23 at lixinyi.23 at
Wed Sep 24 02:27:45 CEST 2008

for example:
#include <Python.h>

void exec_python_code(int arg, char** argv)

What I would like to know is:
after  Py_Main(argc,argv);

How do I get every variable in python space,
say a=[1,2,3,'Hello World',[2,3]]
b=['xx','xxx','ffff',0.1234] , and use them in C++?

any sample code?
Thanks in advance!

More information about the Python-list mailing list