Re: Embedding Python in C/C++

2006-08-10 Thread kingcrustybun
We are still struggling with this but having spent many hours looking at related code on the net, i have noticed the following sequence quite a lot globals = PyDict_New(); PyDict_SetItemString(globals, "__builtins__", PyEval_GetBuiltins()); Can anyone explain what this does exactly? I know what "

Embedding Python in C/C++

2006-08-09 Thread kingcrustybun
Not a Python newb but a bit out of my depth here... We are trying to use the Python interpreter from within a C/C++ aplication to execute Python code which is in an external file. The idea is to share a dictionary between the C app and the python script. After Py_Initialize() we do something like