pygame2.examples – examples for Pygame2

Examples package for Pygame2.

This package contains code snippets demonstrating the aspects of the various Pygame2 modules. Each example is a module of its own and can be easily executed using

python -m pygame2.examples.<module>.<example>

To run the drawing pygame2.sdlext example, you would type

python -m pygame2.examples.sdlext.draw

Currently the following examples exists:

Example Description
pygame2.examples.import Simple import example for all Pygame2 modules.
pygame2.examples.py2exe_setup Win32 standalone executable creation example using Pygame2.
pygame2.examples.freetype.sdlfont Simple freetype example
pygame2.examples.sdl.cdrom Demonstrates the features of the pygame2.sdl.cdrom module.
pygame2.examples.sdl.hello_world The almighty “Hello World” example using the pygame2.sdl module.
pygame2.examples.sdl.keyboard Demonstrates keyboard input and event handling for the pygame2.sdl.keyboard module.
pygame2.examples.sdl.mouse Demonstrates mouse input and event handling for the pygame2.sdl.mouse module.
pygame2.examples.sdl.surface_blit Demonstrates supported blitting operations for pygame2.sdl.video.Surface objects.
pygame2.examples.sdl.surface_fill Demonstrates supported filling operations for pygame2.sdl.video.Surface objects.
pygame2.examples.sdlext.draw Demonstrates the features of the pygame2.sdlext.draw module.
pygame2.examples.sdlext.pixelarray Demonstrates the features of the pygame2.sdlext.PixelArray class.

Previous topic

pygame2.colorpalettes – Various, indexed color palettes

Next topic

pygame2.font – A module used to find system fonts

This Page