[C++-sig] Function handling with Boost
Stefan Seefeld
seefeld at sympatico.ca
Tue Jun 23 20:43:31 CEST 2009
On 06/23/2009 02:32 PM, Christopher Schramm wrote:
> Mmmkay, looks like I found a dirty little workaround:
>
I read your original mail, but I didn't understand what you are trying
to achieve. You certainly can export functions to python:
void foo(...);
...
bpl::def("foo", foo);
works just fine. There shouldn't be any need to wrap the function in a
class (member function), and then create some hidden object to invoke
it. Or am I misunderstanding what you want ?
> global["my_mod"].attr("__dict__")["f1"] = tmp.attr("__dict__")["f1"];
>
Why not simply
global["my_mod"]["f1"] = ... ; ?
HTH,
Stefan
--
...ich hab' noch einen Koffer in Berlin...
More information about the Cplusplus-sig
mailing list