Page 1 of 1

Python Wrapper

Posted: Fri Sep 04, 2009 7:57 am
by grervirg
Has anyone Had any success creating a wrapper for python since 1.3 all the python projects are dead it seems and I really need a wrapper for python I would like to use the newer features in 1.5 but I cannot seem to have any luck getting anything to work =( any one have any suggestions or know where I can find a wrapper I've tryed everything I can but I can't program c at all so I'm stuck till and irrlicht would be perfect fit for my project if I can get it to talk to python

Posted: Fri Sep 04, 2009 7:51 pm
by serengeor
Well I saw the wrapper is dead ( I think) and what I did is I used python c/api
its more harder than using a wrapper but it is still good for small tasks.
but if you want more power try using boost python or swig. :wink:

Here's a tutorial that I've used for python embedding, it's really good explained.
http://www.ragestorm.net/tutorial?id=21

Posted: Fri Sep 04, 2009 8:16 pm
by Reiko
I know this is a bit off topic, but I just want to ask. What's the advantage of using python? Not saying its bad, actually Python is probably one of my fave languages. I just wondered how well it performs in this field (games programming) or what benefits it has over simply using c++.

Posted: Fri Sep 04, 2009 8:51 pm
by serengeor
Well it simply makes game more maintainable since you can rewrite scripts easily and you don' t need to recompile the source it self. :)

Swig and Boost

Posted: Fri Sep 04, 2009 11:21 pm
by grervirg
I've been trying to experiment with boost and swig with little success so far I can get swig to go farther then boost but I cannot get either to really work. I even tryed to build off of the old pyrr files to update but I get tons of compiler errors and syntax errors when I do I was looking into ctypes but since the dll is mangled its hard to figure out how to call the functions from it and when I get the function to call I can't get the args right is there a better tutorial for this or swig

Posted: Sat Sep 05, 2009 6:39 pm
by serengeor
Well I cant really help you further on boost python or swig because i failed on implementing both of them :oops:

Posted: Fri Jan 29, 2010 11:22 pm
by spock
i would also like to see an up-to-date python wrapper.

maybe someone could look at python-ogre for inspiration? it uses py++ for generating the wrapper and py++ is supposed to be the most convenient way at the moment for wrapping c++ code for python.