SDL2 wrapper with cffi
Project description
pysdl2-cffi is a Python wrapper for SDL2 written using cffi, featuring:
A cffi + dlopen interface to the underlying SDL2 libraries.
Automatically generated, consistent helper functions for SDL2, SDL_image, SDL_mixer, and SDL_ttf that hide most allocation and dereferencing.
Useful docstrings on every function, including the C function signature and (for SDL2 only) the library’s original doxygen documentation reformatted as Sphinx restructured text.
A small collection of libSDL2’s original example / test programs converted to Python using Eric S. Raymond’s ctopy.
The goal is to provide a flat, consistent, faithful-to-C binding with some more-Pythonic renaming and conveniences.
This wrapper won’t contain anything that doesn’t directly translate to part of the library’s API. The goal is to be a dependency for something like pygame, not a replacement.
This library is developed on Linux and OS X; not yet tested on Windows.
This library is licensed under the GPLv2 or (at your option) any later version.
Install with pip, or download from https://pypi-hypernode.com/pypi/pysdl2-cffi
Source hosted at https://bitbucket.org/dholth/pysdl2-cffi
Documentation hosted at https://pythonhosted.org/pysdl2-cffi
0.6.0
Windows is now supported! You must manually download the SDL2 dll’s and place them on PATH set PATH=%PATH%;C:usersmeSDL2Dir but pysdl2-cffi will attempt to load the Windows .dll as well as the Unix .so files.
0.5.1
Enums are no longer wrapped in (nonexistent) classes
Python 2 can also pass Unicode where char* is required; automatically encoded to utf-8.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for pysdl2_cffi-0.6.0-py2.py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fab3146c6a6579c10f024207f121d5079e758989d13cb3c2a97f55108f7b9242 |
|
MD5 | d1832a219237b2445e65b005fed05714 |
|
BLAKE2b-256 | 0487c51ffa4fa465a6135e1ee4105a45d05da69c8807fe1fb9fbb4ed8b779604 |