pyirrlicht - python ctypes binding

Announce new projects or updates of Irrlicht Engine related tools, games, and applications.
Also check the Wiki
devsh
Competition winner
Posts: 2057
Joined: Tue Dec 09, 2008 6:00 pm
Location: UK
Contact:

Post by devsh »

unfortunately I cannot use this project (hence why my project is going so slow), I want to embed python and not extend and make irrlicht usable by python itself (unlike pyirrlicht).
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

spock wrote:interesting! :)

so does this use ctypes or swig now?

i thought ctypes only works for c? how did you do a c++ wrapper using ctypes then?

is python 3.1/3.2 supported?
mainly ctypes, swig as nested project.

low level dll with many exported functions - python module have wrappered classes over these functions.

all versions python is supported.
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

devsh wrote:unfortunately I cannot use this project (hence why my project is going so slow), I want to embed python and not extend and make irrlicht usable by python itself (unlike pyirrlicht).
if you do embeded python functional most compatible with irrlicht, perhaps you save time in the future.
also i willing to help with python code.
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

spock wrote:i thought ctypes only works for c? how did you do a c++ wrapper using ctypes then?
perhaps this project be interest for you http://code.google.com/p/ctypes-stuff/s ... ctypes-cpp
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

new version with some bugs fixed and some memory optimization
Whirled Peas
Posts: 47
Joined: Mon Jan 10, 2011 8:01 pm
Location: SoCal

Post by Whirled Peas »

does this work with irrbullet? Or do I have to go in and manually include the bullet libraries in stead?
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

Whirled Peas wrote:does this work with irrbullet? Or do I have to go in and manually include the bullet libraries in stead?
I'm not sure, but there should be no problems with it.
If Bullet has no implementation with Python, then it may be mixed with irrlicht_c.dll (see source).
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

new version with FreeBASIC support
roxaz
Posts: 575
Joined: Tue Jan 23, 2007 8:35 pm
Location: LT

Post by roxaz »

i am wondering why its called irrlicht_c.dll instead of original irrlicht.dll? did you have to modify engine itself somehow?

by the way great project, i just recently started looking for py wrapper for irrlicht and your project fell from the sky like gift of gods, thanks :)
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

roxaz wrote:i am wondering why its called irrlicht_c.dll instead of original irrlicht.dll? did you have to modify engine itself somehow?
because this differs from original as C from C++
these not modify, only some additions, such as grid and vector font from this forum

patched python script with some bugs fixed http://kolosov.ath.cx/pyirrlicht_py_0951.zip

Thank you for your interest in my project
anoki
Posts: 58
Joined: Fri May 05, 2006 8:31 am

Post by anoki »

Great to see a python binding to irrlicht again !
thanks for the great work.
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Post by _maxim_ »

anoki wrote:Great to see a python binding to irrlicht again !
thanks for the great work.
Thanks anoki

New version is accessible
jpalard
Posts: 3
Joined: Sat May 28, 2011 3:01 pm

irrlicht_swig on unix

Post by jpalard »

I found a bug in irrlicht.i :
irrlicht.i mentions IGUIToolBar.h but the file in irrlicht 1.7.1 is named iGUIToolbar.h so it works on case insensitive OSes (windows) but fail on others (i'm on Debian)

But it seems to have another but, i'm trying with :
swig -c++ -o irr_pyXX.cxx -keyword -I../irrlicht_1.7.1/include -python -castmode -cppcast -interface irr_pyXX irrlicht.i

And I got :

Code: Select all

../irrlicht-1.7.1/include/irrArray.h:282: Warning(362): operator= ignored
../irrlicht-1.7.1/include/irrArray.h:311: Warning(389): operator[] ignored (consider using %extend)
../irrlicht-1.7.1/include/irrArray.h:320: Warning(389): operator[] ignored (consider using %extend)
../irrlicht-1.7.1/include/irrList.h:171: Warning(362): operator= ignored
../irrlicht-1.7.1/include/irrMap.h:833: Warning(389): operator[] ignored (consider using %extend)
../irrlicht-1.7.1/include/irrMap.h:843: Warning(362): operator= ignored
../irrlicht-1.7.1/include/irrString.h:248: Warning(362): operator= ignored
../irrlicht-1.7.1/include/irrString.h:256: Warning(362): operator= ignored
../irrlicht-1.7.1/include/irrString.h:303: Warning(362): operator= ignored
../irrlicht-1.7.1/include/irrString.h:332: Warning(389): operator[] ignored (consider using %extend)
../irrlicht-1.7.1/include/irrString.h:340: Warning(389): operator[] ignored (consider using %extend)
irrUString.h:1037: Warning(362): operator= ignored
irrUString.h:1066: Warning(362): operator= ignored
irrUString.h:1084: Warning(362): operator= ignored
irrUString.h:1102: Warning(362): operator= ignored
irrUString.h:1120: Warning(362): operator= ignored
irrUString.h:1137: Warning(362): operator= ignored
irrUString.h:1153: Warning(362): operator= ignored
irrUString.h:1162: Warning(389): operator[] ignored (consider using %extend)
irrUString.h:1171: Warning(389): operator[] ignored (consider using %extend)
../irrlicht-1.7.1/include/dimension2d.h:43: Warning(362): operator= ignored
../irrlicht-1.7.1/include/vector2d.h:39: Warning(362): operator= ignored
../irrlicht-1.7.1/include/vector2d.h:41: Warning(362): operator= ignored
../irrlicht-1.7.1/include/vector3d.h:38: Warning(362): operator= ignored
irrlicht.i:349: Warning(302): Identifier 'GetText' redefined (ignored),
irrlicht.i:347: Warning(302): previous definition of 'GetText'.
irrlicht.i:465: Warning(302): Identifier 'LogEvent_Text' redefined (ignored),
irrlicht.i:462: Warning(302): previous definition of 'LogEvent_Text'.
../irrlicht-1.7.1/include/IQ3Shader.h:21: Error: Syntax error in input(1).
Does someone have an idea ?
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Re: irrlicht_swig on unix

Post by _maxim_ »

jpalard wrote:I found a bug in irrlicht.i :

Does someone have an idea ?
Thanks with your bug report, I look tomorrow this.

Now is new version with SVG partial support via AGG library.
_maxim_
Posts: 54
Joined: Thu May 27, 2010 11:05 am
Location: Russia
Contact:

Re: irrlicht_swig on unix

Post by _maxim_ »

jpalard wrote:

Code: Select all

../irrlicht-1.7.1/include/IQ3Shader.h:21: Error: Syntax error in input(1).
Does someone have an idea ?
Sorry for delay.
Change IQ3Shader.h line 21 to "static core::stringc irrEmptyStringc;"
Post Reply