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

anders langlands anderslanglands at gmail.com
Mon Sep 11 14:24:31 CEST 2006


Hi Stefan,

Well PyCode_New is undocumented as far as I can see, and the header doesn't
even name the arguments!

new.code is documented in the library reference under module new. Its
documentation is equally illuminating: it simply says "An interface to
PyCode_New"...

boost::python::exec sounds like exactly what I want... but I can find no
documentation for this either, do you have I link? Nor can I find it in any
of the boost::python headers. we're using boost 1_33_1 here at the moment.

A

On 9/11/06, Stefan Seefeld <seefeld at sympatico.ca> wrote:
>
> 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...
> _______________________________________________
> C++-sig mailing list
> C++-sig at python.org
> http://mail.python.org/mailman/listinfo/c++-sig
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/cplusplus-sig/attachments/20060911/3944662b/attachment.htm>


More information about the Cplusplus-sig mailing list