What is the function to evaluate code object returned byPyParser _SimpleParseString function?
Terry Reedy
tjreedy at udel.edu
Thu Nov 15 18:11:49 EST 2007
"Borse, Ganesh" <ganesh.borse at credit-suisse.com> wrote in message
news:F444CAE5E62A714C9F45AA292785BED327C3BF57 at esng11p33001.sg.csfb.com...
| Py_CompileString takes the source code from file, isn't it?
No.
| As can be seen from the syntax of this function: "PyObject*
Py_CompileString(char *str, char *filename, int start)"
I am rather sure that the filename param is the same as for the
Python-level builtin function compile:
compile( string, filename, kind[, flags[, dont_inherit]])
Compile the string into a code object. Code objects can be executed by an
exec statement or evaluated by a call to eval(). The filename argument
should give the file from which the code was read; pass some recognizable
value if it wasn't read from a file ('<string>' is commonly used).
The filename is used for exception traceback messages.
More information about the Python-list
mailing list