Mateusz Loskot :: hacking on, working out, living up

Notes on PyEval_EvalCodeEx

24 Sep 2011 | mloskot

Recently, I tried to figure out what is the actual result of PyEval_EvalCodeEx call from the Python C API. The documentation is less than sparse. Obviously, the function returns result of expression evaluation. The result is returned as pointer to PyObject, but the type has a bit opaque nature, so means nothing without querying and inspecting underlying data.

Luckily, I have received a couple of answers on the Python mailing list as well as from ACCU folks . Here is very quick summary of the PyEval_EvalCodeEx function:

I can’t do it now, but I’m going to check if all those statements are correct.

Fork me on GitHub