SFML community forums

Bindings - other languages => Python => Topic started by: mweb on August 17, 2007, 01:16:35 am

Title: Python,... bindings
Post by: mweb on August 17, 2007, 01:16:35 am
Hi I'm working on getting SWIG files to work with sfml. Since it is possible to create bindings for several languages with SWIG it should be possible to build it for different ones. I will only test it for python at I try to avoid any specialties of python in the first version.
The audio part is fully working, the window and graphics part are partly working yet. There are some problems with the Event class and the Color class. I haven't yet tested the network part. On the system part the randomizer is working i haven't yet tested the Clock. I didn't wrap the Threading yet since this would need some more work and I don't now if this is necessary since most scripting languages will provide threading support them self.
I just send you this message that you know someone is working on this so no one has to do same work ;-)
I try to get the bindings work as good as possible and adding the examples translated to python.
Title: Python,... bindings
Post by: Alp on August 17, 2007, 02:18:38 am
Very interesting.

Thanks a lot for your work.
When it'll be possible, you can show us some shots of the python binding working :)
Title: Python,... bindings
Post by: Laurent on August 17, 2007, 08:38:09 am
Great  :)

Very good job, and thank you for your help. I'm sure a lot of developers will be happy to get SFML working on these languages.
Title: Python,... bindings
Post by: mweb on August 26, 2007, 01:31:46 pm
Ok I got a first version working. It is not that well as i thought i can do. but since i won't have the time during the next three months to work on this anyway I'll give it free to you. Maybe you can use it for getting scripting support or you just forget about it. What ever you want.
No everything is working yet there is a TODO file that describes what is not working and what does. I have tested it against the SVN 206 version. There are some problem i got with the SVN version that did work with SFML 1.0. It is described in the TODO file.
I have written some of the examples from the tutorial as python scripts. The audio from stream does not work but the rest of the written examples should work.
Sorry that I don't have the time for finishing it. I will check the forum if you have any question or just send me an email. I till try to help as good as possible.

The link where you can find the binding. I will leave this file there for about a month. After that I will remove it.
http://iserver.hta.fhz.ch/~ibweber/swig_sfml.tar.gz


Still thanks for your lib. I will for sure use the audio part but not the rest since i already got this part fully working.
Title: Python,... bindings
Post by: Laurent on August 26, 2007, 02:18:07 pm
Thank you very much for your contribution.

I'll try to finish it, but if anyone is interested to do it, please let me know ;)
Title: Python,... bindings
Post by: amiralawi on September 23, 2007, 04:02:51 am
Is the development on the python bindings still active?  I'm very interested in getting a working python implementation and have been working on it using boost.python: I would be willing to share it if it's needed.
Title: Python,... bindings
Post by: Laurent on September 23, 2007, 01:00:54 pm
I still haven't had the time to work on the Python binding, so if you have something to share it could be very helpful :)
Title: Python,... bindings
Post by: Pol on August 13, 2009, 11:34:47 pm
I'm working on a project that will redistribute SFML with a custom import method ... I'll post about it in the projects section when I reach the next milestone; keep on the lookout.

Basically the point is to have a single distribution of the libs that works across all supported archs (32/64bit), systems (w32/linux/mac) and python versions(2.5,2.6,3.0) with a single simplified import procedure.

Note, only supporting the officially available binaries.. So if more are added / updated, I will synchronize my system.