How can I evaluate an arbitrary Python expression from C?

Call the function PyRun_String from the previous question with the start symbol Py_eval_input; it parses an expression, evaluates it and returns its value.

CATEGORY: extending

 

A Django site. this page was rendered by a django application in 0.00s 2011-12-23 01:02:41.839202. hosted by webfaction.