Embedding Python in C/C++
kingcrustybun
ericcoetzee at gmail.com
Thu Aug 10 09:54:00 EDT 2006
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 "__builtins__"
is from a Python perspective but cant understand why you would want to
add it to another newly created dictionary?
Also, where can i find info on PyEval_GetBuiltins().
It does not appear in the Release 2.4.3 Python/C API Reference index at
http://docs.python.org/api/genindex.html
In fact there are a whole lot of PyEval_??? items which do not appear
in this index.
Are these deprecated? If so what does on use now?
Any idea please?
More information about the Python-list
mailing list