A question about Python's API

Skip Montanaro skip at pobox.com
Sat Mar 13 21:23:58 CET 2004


    Gary> There is a function named PyEval_EvalCode which looks like the
    Gary> right thing to use, but it's not part of the published API, and
    Gary> it's definition is not included when one #include's Python.h.
    Gary> Nevertheless, I've suggested that he #include eval.h and try
    Gary> calling the function to see if it is what he wants.

    Gary> So ...  Is this our oversight, and there really is something in
    Gary> the API to execute the code object returned by Py_CompileString,
    Gary> or should the API be enhanced to include PyEval_EvalCode or
    Gary> something similar?

Looks like a bug in Include/Python.h.  Thanks for pointing it out.

Skip





More information about the Python-list mailing list