469,610 Members | 1,649 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,610 developers. It's quick & easy.

A question about Python's API

Hello python-list,

A student trying to embed Python into a game engine seems to have
uncovered the following oversight of Python's API,

There is a function named Py_CompileString which produces a code
object from a string, but we can't find a a function in the published
API to execute that code object.

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

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


Gary Herron

Jul 18 '05 #1
0 786

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

220 posts views Thread by Brandon J. Van Every | last post: by
54 posts views Thread by Brandon J. Van Every | last post: by
3 posts views Thread by fdsl ysnh | last post: by
65 posts views Thread by Steven Watanabe | last post: by
21 posts views Thread by Roy Smith | last post: by
reply views Thread by devrayhaan | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.