[C++-sig] PyCode_New and new.code() functions

Stefan Seefeld seefeld at sympatico.ca
Mon Sep 11 13:40:59 CEST 2006


anders langlands wrote:
> Does anyone know how to use either PyCode_New or new.code()??
> Specifically I
> want to use new.code() and new.function() to generate some python functions
> from strings, which I can then call in python at some later time.

Not knowing what PyCode_New or new.code() do (do you have a pointer ?),
can't you use boost::python::exec() to convert strings to executable code ?

(David, http://www.boost.org/libs/python/doc/ doesn't seem to contain the
'new' documentation for exec and exec_file yet. Is that intentional ?)

Regards,
		Stefan

-- 

      ...ich hab' noch einen Koffer in Berlin...



More information about the Cplusplus-sig mailing list