Giter Site home page Giter Site logo

py-sdl2's Introduction

PySDL2

Tests PyPI - Python Version PyPI Version

PySDL2 is a pure Python wrapper around the SDL2, SDL2_mixer, SDL2_image, SDL2_ttf, and SDL2_gfx libraries. Instead of relying on C code, it uses the built-in ctypes module to interface with SDL2, and provides simple Python classes and wrappers for common SDL2 functionality.

Installation

PySDL2 is easy to install and integrate within your own projects. To install or update to the latest version, simply run one of the following commands in a terminal:

# Install latest stable version from PyPI
pip install -U pysdl2

# Install latest development verion from GitHub
pip install -U git+https://github.com/marcusva/py-sdl2.git

Note: If installing on Python 3 on a computer where both Python 2 and 3 are installed, replace pip with pip3 in the above commands.

Requirements

In order for PySDL2 to work, the binaries for SDL2 (and any SDL2 addon modules you wish to use, e.g. SDL2_mixer) need to be installed on your system. On macOS and Windows, the recommended way to install the SDL2 binaries is via the pysdl2-dll package using pip:

pip install pysdl2-dll

This will install pre-built binaries for all supported SDL2 libraries as a Python package, which PySDL2 will automatically load if available. On Linux and other Unix-like OSes, you can install the SDL2 binaries using your system's package manager (which may be out of date), or alternatively build and install the latest versions yourself from source.

The current minimum supported versions for each library are listed below:

  • SDL2 >= 2.0.5
  • SDL2_mixer >= 2.0.1 (for the sdl2.sdlmixer module)
  • SDL2_ttf >= 2.0.14 (for the sdl2.sdlttf module)
  • SDL2_image >= 2.0.1 (for the sdl2.sdlimage module)
  • SDL2_gfx >= 1.0.3 (for the sdl2.sdlgfx module)

Documentation

If you just started with SDL and PySDL2, it is strongly recommended that you read through the tutorial of the documentation to learn the basics. You can find the documentation at doc/html or online at http://pysdl2.readthedocs.org.

License

This library is given to the public domain. There are no licensing restrictions. Please see doc/copying.rst for further details.

py-sdl2's People

Contributors

a-hurst avatar ahills avatar bnavigator avatar ecsv avatar fabtjar avatar joepolak avatar johny22 avatar jvarho avatar kml27 avatar kutu avatar lecram avatar lheckemann avatar marcusva avatar maxbareiss avatar mgorny avatar mindfilleter avatar mtn avatar pvallet avatar rovitotv avatar shjohnson-pi avatar smcv avatar smealum avatar stillinbeta avatar techtonik avatar theatomicoption avatar tinmarr avatar tycode avatar zmarvel avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.