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...
_______________________________________________
Cplusplus-sig mailing list
Cplusplus-sig@python.org
http://mail.python.org/mailman/listinfo/cplusplus-sig