PySDL

Hi,

I wrote some Python bindings for SDL.

It is purely written in Python. It parses the SDL headers and automatically creates the interface with ctypes on-the-fly. I think that this is a much better approach which should in theory always be up-to-date without requiring any further work.

This is a very early version and I only tested it on MacOSX but it seems to work fine.

Maybe this is useful for some. I would be very happy if some people could join me on working on this.

Cya,
Albert

Hi,

nothing against the work you have done, but why use it instead of PyGame?–
Paulo

On Tue, Jun 28, 2011 at 10:54 PM, albert wrote:

**
Hi,

I wrote some Python bindings for SDL.

It is purely written in Python. It parses the SDL headers and automatically
creates the interface with ctypes on-the-fly. I think that this is a much
better approach which should in theory always be up-to-date without
requiring any further work.

https://github.com/albertz/PySDL

This is a very early version and I only tested it on MacOSX but it seems to
work fine.

Maybe this is useful for some. I would be very happy if some people could
join me on working on this.

Cya,
Albert


SDL mailing list
SDL at lists.libsdl.org
http://lists.libsdl.org/listinfo.cgi/sdl-libsdl.org

Disadvantages of Pygame:

  • It needs C. That makes it more difficult to install and a bit more complicated to port.
  • It requires much more (infinitely more) work to keep Pygame up-to-date with SDL.
  • Pygame is not a direct 1:1 SDL binding. It rather has its own interface to SDL.

hi,

very cool!

Note, that there is a pygame ctypes branch already, which is generated based
on the SDL 1.2 branch. It might be worth checking that out. It wraps SDL
closely and then implements the pygame API on top of that.

cheers,