View Single Post
Old Oct 11th, 2006, 1:45 AM   #7
Game_Ender
Professional Programmer
 
Game_Ender's Avatar
 
Join Date: May 2006
Location: Maryland, USA
Posts: 306
Rep Power: 3 Game_Ender is on a distinguished road
I have played around with Boost.Python it provides a very nice python interface and wrapping system. Combined with Py++ you can even get SWIG like wrapper generation. The only downside is of course the compile time which will can get a little long due to the heavy use of templates. But you have to admit being able to do this is pretty cool:
object f(object x, object y) {
     if (y == "foo")
         x.slice(3,7) = "bar";
     else
         x.attr("items") += y(3, x);
     return x;
}
object getfunc() {
    return object(f);
}
Game_Ender is offline   Reply With Quote