From the docs:
int Py_eval_input
The start symbol from the Python grammar for isolated expressions; for use with
Py_CompileString()
.
int Py_file_input
The start symbol from the Python grammar for sequences of statements as read from a file or other source; for use with
Py_CompileString()
. This is the symbol to use when compiling arbitrarily long Python source code.
int Py_single_input
The start symbol from the Python grammar for a single statement; for use with
Py_CompileString()
. This is the symbol used for the interactive interpreter loop.
Py_single_input
evaluates the string as a statement. Statements don't inherently return anything, so you'll get None
back from PyRun_String
. Use Py_eval_input
instead to evaluate the string as an expression and get a result.