Commits

Lenard Lindstrom  committed c496066

add examples module document page

  • Participants
  • Parent commits 4e990d6

Comments (0)

Files changed (34)

File docs/index.html

       <a href="ref/display.html">Display</a>&nbsp;||&nbsp;
       <a href="ref/draw.html">Draw</a>&nbsp;||&nbsp;
       <a href="ref/event.html">Event</a>&nbsp;||&nbsp;
+      <a href="ref/examples.html">Examples</a>&nbsp;||&nbsp;
       <a href="ref/font.html">Font</a>&nbsp;||&nbsp;
       <a href="ref/image.html">Image</a>&nbsp;||&nbsp;
       <a href="ref/joystick.html">Joystick</a>&nbsp;||&nbsp;
   <dt><a href="ref/display.html">Display</a></dt><dd> Configuring the display surface.</dd>
   <dt><a href="ref/draw.html">Draw</a></dt><dd> Drawing simple shapes like lines and ellipses to surfaces.</dd>
   <dt><a href="ref/event.html">Event</a></dt><dd> Manage the incoming events from various input devices and the windowing platform.</dd>
+  <dt><a href="ref/examples.html">Examples</a></dt><dd> Various programs demonstrating the use of individual pygame modules.</dd>
   <dt><a href="ref/font.html">Font</a></dt><dd> Loading and rendering Truetype fonts.</dd>
   <dt><a href="ref/image.html">Image</a></dt><dd> Loading, saving, and transferring of surfaces.</dd>
   <dt><a href="ref/joystick.html">Joystick</a></dt><dd> Manage the joystick devices.</dd>

File docs/ref/camera.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/cdrom.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/color.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/cursors.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/display.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/draw.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/event.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/examples.html

+
+<html>
+<title>examples - Pygame Documentation</title>
+<body bgcolor=#aaeebb text=#000000 link=#331111 vlink=#331111>
+
+
+<table cellpadding=0 cellspacing=0 border=0 style='border: 3px solid black;' width='100%'>
+<tr>
+<td bgcolor='#c2fc20' style='padding: 6px;' align=center valign=center><a href='http://www.pygame.org/'><img src='../pygame_tiny.gif' border=0 width=200 height=60></a><br><b>pygame documentation</b></td>
+<td bgcolor='#6aee28' style='border-left: 3px solid black; padding: 6px;' align=center valign=center>
+	||&nbsp;
+	<a href=http://www.pygame.org>Pygame Home</a> &nbsp;||&nbsp;
+	<a href=../index.html>Help Contents</a> &nbsp;||
+	<a href=index.html>Reference Index</a> &nbsp;||
+	<br>&nbsp;<br>
+	
+<a href="camera.html">Camera</a>&nbsp;||&nbsp;
+<a href="cdrom.html">Cdrom</a>&nbsp;||&nbsp;
+<a href="color.html">Color</a>&nbsp;||&nbsp;
+<a href="cursors.html">Cursors</a>&nbsp;||&nbsp;
+<a href="display.html">Display</a>&nbsp;||&nbsp;
+<a href="draw.html">Draw</a>&nbsp;||&nbsp;
+<a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
+<a href="font.html">Font</a>&nbsp;||&nbsp;
+<a href="image.html">Image</a>&nbsp;||&nbsp;
+<a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
+<a href="key.html">Key</a>&nbsp;||&nbsp;
+<a href="locals.html">Locals</a>&nbsp;||&nbsp;
+<a href="mask.html">Mask</a>&nbsp;||&nbsp;
+<a href="mixer.html">Mixer</a>&nbsp;||&nbsp;
+<a href="mouse.html">Mouse</a>&nbsp;||&nbsp;
+<a href="movie.html">Movie</a>&nbsp;||&nbsp;
+<a href="music.html">Music</a>&nbsp;||&nbsp;
+<a href="overlay.html">Overlay</a>&nbsp;||&nbsp;
+<a href="pixelarray.html">Pixelarray</a>&nbsp;||&nbsp;
+<a href="pygame.html">Pygame</a>&nbsp;||&nbsp;
+<a href="rect.html">Rect</a>&nbsp;||&nbsp;
+<a href="scrap.html">Scrap</a>&nbsp;||&nbsp;
+<a href="sndarray.html">Sndarray</a>&nbsp;||&nbsp;
+<a href="sprite.html">Sprite</a>&nbsp;||&nbsp;
+<a href="surface.html">Surface</a>&nbsp;||&nbsp;
+<a href="surfarray.html">Surfarray</a>&nbsp;||&nbsp;
+<a href="tests.html">Tests</a>&nbsp;||&nbsp;
+<a href="time.html">Time</a>&nbsp;||&nbsp;
+<a href="transform.html">Transform</a>
+</td></tr></table>
+<br>
+
+
+<a name="pygame.examples">
+<big><b>pygame.examples</big></b><br><ul>
+  <i>module of example programs</i><br>
+<ul><small><table>
+  <tr><td><a href="examples.html#pygame.examples.aliens.main">pygame.examples.aliens.main</a> - <font size=-1>play the full aliens example</font></td><td>play the full aliens example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.oldalien.main">pygame.examples.oldalien.main</a> - <font size=-1>play the original aliens example</font></td><td>play the original aliens example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.stars.main">pygame.examples.stars.main</a> - <font size=-1>run a simple starfield example</font></td><td>run a simple starfield example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.fonty.main">pygame.examples.fonty.main</a> - <font size=-1>run a font rendering example</font></td><td>run a font rendering example</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.vgrade.main">pygame.examples.vgrade.main</a> - <font size=-1>display a vertical gradient</font></td><td>display a vertical gradient</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.arraydemo.main">pygame.examples.arraydemo.main</a> - <font size=-1>show various surfarray effects</font></td><td>show various surfarray effects</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.sound.main">pygame.examples.sound.main</a> - <font size=-1>load and play a sound</font></td><td>load and play a sound</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.liquid.main">pygame.examples.liquid.main</a> - <font size=-1>display an animated liquid effect</font></td><td>display an animated liquid effect</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.glcube.main">pygame.examples.glcube.main</a> - <font size=-1>display an animated 3D cube using OpenGL</font></td><td>display an animated 3D cube using OpenGL</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.scrap_clipboard.main">pygame.examples.scrap_clipboard.main</a> - <font size=-1>access the clipboard</font></td><td>access the clipboard</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.mask.main">pygame.examples.mask.main</a> - <font size=-1>display multiple images bounce off each other using collision detection</font></td><td>display multiple images bounce off each other using collision detection</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.teststrite.main">pygame.examples.teststrite.main</a> - <font size=-1>show lots of sprites moving around</font></td><td>show lots of sprites moving around</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.headless_no_windows_needed.main">pygame.examples.headless_no_windows_needed.main</a> - <font size=-1>write an image file that is smoothscaled copy of an input file</font></td><td>write an image file that is smoothscaled copy of an input file</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.overlay.main">pygame.examples.overlay.main</a> - <font size=-1>play a .pgm video using overlays</font></td><td>play a .pgm video using overlays</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.scaletest.main">pygame.examples.scaletest.main</a> - <font size=-1>interactively scale an image using smoothscale</font></td><td>interactively scale an image using smoothscale</td></tr>
+  <tr><td><a href="examples.html#pygame.examples.midi.main">pygame.examples.midi.main</a> - <font size=-1>run a midi example</font></td><td>run a midi example</td></tr>
+</table></small></ul>
+<p>These examples should help get you started with pygame. Here is a brief rundown of what you get. The source code for these examples is in the public domain. Feel free to use for your own projects. </p>
+<p>These examples can be run as stand-alone programs, or as described below, by importing the module and calling its main(). </p>
+<p>Resources for the examples are found in the pygame/examples/data subdirectory. </p>
+<p>We're always on the lookout for more examples and/or example requests. Code like this is probably the best way to start getting involved with python gaming. </p>
+<p>This page is adapted from the original examples <tt>readme.txt</tt> by: </p>
+<pre>    Pete Shinners
+    shredwheat@mediaone.net
+</pre><p>Further references </p>
+<pre>  pySDL    : http://pysdl.sourceforge.net
+  SDL      : http://www.libsdl.org
+  aliens.c : http://www.libsdl.org/projects/aliens
+</pre><p>examples as a package is new to pygame <tt>1.9.0</tt>. </p>
+<!--COMMENTS:pygame.examples--> &nbsp;<br> 
+
+
+<a name="pygame.examples.aliens.main">
+<big><b>pygame.examples.aliens.main</big></b><br><ul>
+  <i>play the full aliens example</i><br>
+  <tt>pygame.aliens.main(): return None</tt><br>
+<p>This started off as a port of the <tt>SDL</tt> demonstration, Aliens. Now it has evolved into something sort of resembling fun. This demonstrates a lot of different uses of sprites and optimized blitting. Also transparency, colorkeys, fonts, sound, music, joystick, and more. <tt>(PS</tt>, my high score is 117! goodluck) </p>
+<!--COMMENTS:pygame.examples.aliens.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.oldalien.main">
+<big><b>pygame.examples.oldalien.main</big></b><br><ul>
+  <i>play the original aliens example</i><br>
+  <tt>pygame.examples.oldalien.main(): return None</tt><br>
+<p>This more closely resembles a port of the <tt>SDL</tt> Aliens demo. The code is a lot simpler, so it makes a better starting point for people looking at code for the first times. These blitting routines are not as optimized as they should/could be, but the code is easier to follow, and it plays quick enough. </p>
+<!--COMMENTS:pygame.examples.oldalien.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.stars.main">
+<big><b>pygame.examples.stars.main</big></b><br><ul>
+  <i>run a simple starfield example</i><br>
+  <tt>pygame.examples.stars.main(): return None</tt><br>
+<p><tt>A</tt> simple starfield example. You can change the center of perspective by leftclicking the mouse on the screen. </p>
+<!--COMMENTS:pygame.examples.stars.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.fonty.main">
+<big><b>pygame.examples.fonty.main</big></b><br><ul>
+  <i>run a font rendering example</i><br>
+  <tt>pygame.examples.fonty.main(): return None</tt><br>
+<p>Super quick, super simple application demonstrating the different ways to render fonts with the font module </p>
+<!--COMMENTS:pygame.examples.fonty.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.vgrade.main">
+<big><b>pygame.examples.vgrade.main</big></b><br><ul>
+  <i>display a vertical gradient</i><br>
+  <tt>pygame.examples.vgrade.main(): return None</tt><br>
+<p>Demonstrates creating a vertical gradient with Numeric python. The app will create a new gradient every half second and report the time needed to create and display the image. If you're not prepared to start working with the Numeric arrays, don't worry about the source for this one :] </p>
+<!--COMMENTS:pygame.examples.vgrade.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.arraydemo.main">
+<big><b>pygame.examples.arraydemo.main</big></b><br><ul>
+  <i>show various surfarray effects</i><br>
+  <tt>pygame.examples.arraydemo.main(): return None</tt><br>
+<p>Another example filled with various surfarray effects. It requires the surfarray and image modules to be installed. This little demo can also make a good starting point for any of your own tests with surfarray </p>
+<p>The example will use NumPy by default, but will use Numeric as a alternative (New pygame <tt>1.9.0)</tt>. </p>
+<!--COMMENTS:pygame.examples.arraydemo.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.sound.main">
+<big><b>pygame.examples.sound.main</big></b><br><ul>
+  <i>load and play a sound</i><br>
+  <tt>pygame.examples.sound.main(file_path=None): return None</tt><br>
+<p>Extremely basic testing of the mixer module. Load a sound and play it. All from the command shell, no graphics. </p>
+<p>If provided, use the audio file 'file_path', otherwise use a default file. </p>
+<p><tt>sound.py</tt> optional command line argument: an audio file </p>
+<!--COMMENTS:pygame.examples.sound.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.liquid.main">
+<big><b>pygame.examples.liquid.main</big></b><br><ul>
+  <i>display an animated liquid effect</i><br>
+  <tt>pygame.examples.liquid.main(): return None</tt><br>
+<p>This example was created in a quick comparison with the BlitzBasic gaming language. Nonetheless, it demonstrates a quick 8-bit setup (with colormap). </p>
+<!--COMMENTS:pygame.examples.liquid.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.glcube.main">
+<big><b>pygame.examples.glcube.main</big></b><br><ul>
+  <i>display an animated 3D cube using OpenGL</i><br>
+  <tt>pygame.examples.glcube.main(): return None</tt><br>
+<p>Using PyOpenGL and pygame, this creates a spinning <tt>3D</tt> multicolored cube. </p>
+<!--COMMENTS:pygame.examples.glcube.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.scrap_clipboard.main">
+<big><b>pygame.examples.scrap_clipboard.main</big></b><br><ul>
+  <i>access the clipboard</i><br>
+  <tt>pygame.examples.scrap_clipboard.main(): return None</tt><br>
+<p><tt>A</tt> simple demonstration example for the clipboard support. </p>
+<!--COMMENTS:pygame.examples.scrap_clipboard.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.mask.main">
+<big><b>pygame.examples.mask.main</big></b><br><ul>
+  <i>display multiple images bounce off each other using collision detection</i><br>
+  <tt>pygame.examples.mask.main(*args): return None</tt><br>
+<p>Positional arguments: </p>
+<pre>    one or more image file names.
+</pre><p>This <tt>pygame.masks</tt> demo will display multiple moving sprites bouncing off each other. More than one sprite image can be provided. </p>
+<p>If run as a program then <tt>mask.py</tt> takes one or more image files as command line arguments. </p>
+<!--COMMENTS:pygame.examples.mask.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.teststrite.main">
+<big><b>pygame.examples.teststrite.main</big></b><br><ul>
+  <i>show lots of sprites moving around</i><br>
+  <tt>pygame.examples.testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0): return None</tt><br>
+<p>Optional keyword arguments: </p>
+<pre>    update_rects - use the RenderUpdate sprite group class
+    use_static - include non-moving images
+    use_FastRenderGroup - Use the FastRenderGroup sprite group
+    screen_dims - pygame window dimensions
+    use_alpha - use alpha blending
+    flags - additional display mode flags
+</pre><p>Like the <tt>testsprite.c</tt> that comes with sdl, this pygame version shows lots of sprites moving around. </p>
+<p>If run as a stand-alone program then no command line arguments are taken. </p>
+<!--COMMENTS:pygame.examples.teststrite.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.headless_no_windows_needed.main">
+<big><b>pygame.examples.headless_no_windows_needed.main</big></b><br><ul>
+  <i>write an image file that is smoothscaled copy of an input file</i><br>
+  <tt>pygame.examples.headless_no_windows_needed.main(fin, fout, w, h): return None</tt><br>
+<p>arguments: </p>
+<pre>    fin - name of an input image file
+    fout - name of the output file to create/overwrite
+    w, h - size of the rescaled image, as integer width and height
+</pre><p>How to use pygame with no windowing system, like on headless servers. </p>
+<p>Thumbnail generation with scaling is an example of what you can do with pygame. </p>
+<p><tt>NOTE:</tt> the pygame scale function uses mmx/sse if available, and can be run in multiple threads. </p>
+<p>If <tt>headless_no_windows_needed.py</tt> is run as a program it takes the following command line arguments: </p>
+<pre>    -scale inputimage outputimage new_width new_height
+    eg. -scale in.png outpng 50 50
+</pre>
+<!--COMMENTS:pygame.examples.headless_no_windows_needed.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.overlay.main">
+<big><b>pygame.examples.overlay.main</big></b><br><ul>
+  <i>play a .pgm video using overlays</i><br>
+  <tt>pygame.examples.overlay.main(fname): return None</tt><br>
+<p>Play the .pgm video fila a path fname. </p>
+<p>If run as a program <tt>overlay.py</tt> takes the file name as a command line argument. </p>
+<!--COMMENTS:pygame.examples.overlay.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.scaletest.main">
+<big><b>pygame.examples.scaletest.main</big></b><br><ul>
+  <i>interactively scale an image using smoothscale</i><br>
+  <tt>pygame.examples.scaletest.main(imagefile, convert_alpha=False, run_speed_test=True): return None</tt><br>
+<p>arguments: </p>
+<pre>    imagefile - file name of source image (required)
+    convert_alpha - use convert_alpha() on the surf (default False)
+    run_speed_test - (default False)
+</pre><p><tt>A</tt> smoothscale example that resized an image on the screen. Vertical and horizontal arrow keys are used to change the width and height of the displayed image. If the convert_alpha option is True then the source image is forced to have source alpha, whether or not the original images does. If run_speed_test is True then a background timing test is performed instead of the interactive scaler. </p>
+<p>If <tt>scaletest.py</tt> is run as a program then the command line options are: </p>
+<pre>    ImageFile [-t] [-convert_alpha]
+    [-t] = Run Speed Test
+    [-convert_alpha] = Use convert_alpha() on the surf.
+</pre>
+<!--COMMENTS:pygame.examples.scaletest.main--> &nbsp;<br> 
+<br></ul>
+
+
+<a name="pygame.examples.midi.main">
+<big><b>pygame.examples.midi.main</big></b><br><ul>
+  <i>run a midi example</i><br>
+  <tt>pygame.examples.midi.main(mode='output', device_id=None): return None</tt><br>
+<p>Arguments: </p>
+<pre>    mode - if 'output' run a midi keyboard output example
+              'input' run a midi event logger input example
+              'list' list available midi devices
+           (default 'output')
+    device_id - midi device number; if None then use the default midi input or
+                output device for the system
+</pre><p>The output example shows how to translate mouse clicks or computer keyboard events into midi notes. It implements a rudimentary button widget and state machine. </p>
+<p>The input example shows how to translate midi input to pygame events. </p>
+<p>With the use of a virtual midi patch cord the output and input examples can be run as separate processes and connected so the keyboard output is displayed on a console. </p>
+<p>new to pygame <tt>1.9.0</tt> </p>
+<!--COMMENTS:pygame.examples.midi.main--> &nbsp;<br> 
+<br></ul>
+<br></ul>
+
+</body></html>

File docs/ref/font.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/image.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/index.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;
 <li><a href="event.html#pygame.event.set_grab">pygame.event.set_grab</a> - <font size=-1>control the sharing of input devices with other applications</font></li>
 <li><a href="event.html#pygame.event.wait">pygame.event.wait</a> - <font size=-1>wait for a single event from the queue</font></li>
 </ul>
+<li><a href="examples.html#pygame.examples">pygame.examples</a> - <font size=-1>module of example programs</font></li>
+<ul>
+<li><a href="examples.html#pygame.examples.aliens.main">pygame.examples.aliens.main</a> - <font size=-1>play the full aliens example</font></li>
+<li><a href="examples.html#pygame.examples.arraydemo.main">pygame.examples.arraydemo.main</a> - <font size=-1>show various surfarray effects</font></li>
+<li><a href="examples.html#pygame.examples.fonty.main">pygame.examples.fonty.main</a> - <font size=-1>run a font rendering example</font></li>
+<li><a href="examples.html#pygame.examples.glcube.main">pygame.examples.glcube.main</a> - <font size=-1>display an animated 3D cube using OpenGL</font></li>
+<li><a href="examples.html#pygame.examples.headless_no_windows_needed.main">pygame.examples.headless_no_windows_needed.main</a> - <font size=-1>write an image file that is smoothscaled copy of an input file</font></li>
+<li><a href="examples.html#pygame.examples.liquid.main">pygame.examples.liquid.main</a> - <font size=-1>display an animated liquid effect</font></li>
+<li><a href="examples.html#pygame.examples.mask.main">pygame.examples.mask.main</a> - <font size=-1>display multiple images bounce off each other using collision detection</font></li>
+<li><a href="examples.html#pygame.examples.midi.main">pygame.examples.midi.main</a> - <font size=-1>run a midi example</font></li>
+<li><a href="examples.html#pygame.examples.oldalien.main">pygame.examples.oldalien.main</a> - <font size=-1>play the original aliens example</font></li>
+<li><a href="examples.html#pygame.examples.overlay.main">pygame.examples.overlay.main</a> - <font size=-1>play a .pgm video using overlays</font></li>
+<li><a href="examples.html#pygame.examples.scaletest.main">pygame.examples.scaletest.main</a> - <font size=-1>interactively scale an image using smoothscale</font></li>
+<li><a href="examples.html#pygame.examples.scrap_clipboard.main">pygame.examples.scrap_clipboard.main</a> - <font size=-1>access the clipboard</font></li>
+<li><a href="examples.html#pygame.examples.sound.main">pygame.examples.sound.main</a> - <font size=-1>load and play a sound</font></li>
+<li><a href="examples.html#pygame.examples.stars.main">pygame.examples.stars.main</a> - <font size=-1>run a simple starfield example</font></li>
+<li><a href="examples.html#pygame.examples.teststrite.main">pygame.examples.teststrite.main</a> - <font size=-1>show lots of sprites moving around</font></li>
+<li><a href="examples.html#pygame.examples.vgrade.main">pygame.examples.vgrade.main</a> - <font size=-1>display a vertical gradient</font></li>
+</ul>
 <li><a href="font.html#pygame.font">pygame.font</a> - <font size=-1>pygame module for loading and rendering fonts</font></li>
 <ul>
 <li><a href="font.html#pygame.font.Font">pygame.font.Font</a> - <font size=-1>create a new Font object from a file</font></li>

File docs/ref/joystick.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/key.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/locals.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/mask.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/mixer.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/mouse.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/movie.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/music.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/overlay.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/pixelarray.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/pygame.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/rect.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/scrap.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/sndarray.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/sprite.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/surface.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/surfarray.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/tests.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/time.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File docs/ref/transform.html

 <a href="display.html">Display</a>&nbsp;||&nbsp;
 <a href="draw.html">Draw</a>&nbsp;||&nbsp;
 <a href="event.html">Event</a>&nbsp;||&nbsp;
+<a href="examples.html">Examples</a>&nbsp;||&nbsp;
 <a href="font.html">Font</a>&nbsp;||&nbsp;
 <a href="image.html">Image</a>&nbsp;||&nbsp;
 <a href="joystick.html">Joystick</a>&nbsp;||&nbsp;

File lib/examples.doc

+pygame.examples
+module of example programs
+
+These examples should help get you started with pygame. Here is a
+brief rundown of what you get. The source code for these examples
+is in the public domain. Feel free to use for your own projects.
+
+These examples can be run as stand-alone programs, or as described
+below, by importing the module and calling its main().
+
+Resources for the examples are found in the pygame/examples/data
+subdirectory.
+
+We're always on the lookout for more examples and/or example
+requests. Code like this is probably the best way to start
+getting involved with python gaming.
+
+This page is adapted from the original examples readme.txt by:
+    Pete Shinners
+    shredwheat@mediaone.net
+
+Further references
+
+  pySDL    : http://pysdl.sourceforge.net
+  SDL      : http://www.libsdl.org
+  aliens.c : http://www.libsdl.org/projects/aliens
+
+examples as a package is new to pygame 1.9.0.
+<SECTION>
+
+
+
+aliens.main
+play the full aliens example
+pygame.aliens.main(): return None
+
+This started off as a port of the SDL demonstration,
+Aliens. Now it has evolved into something sort of resembling
+fun. This demonstrates a lot of different uses of sprites and
+optimized blitting. Also transparency, colorkeys, fonts, sound,
+music, joystick, and more. (PS, my high score is 117! goodluck)
+<END>
+
+
+
+oldalien.main
+play the original aliens example
+pygame.examples.oldalien.main(): return None
+
+This more closely resembles a port of the SDL Aliens
+demo. The code is a lot simpler, so it makes a better starting
+point for people looking at code for the first times. These
+blitting routines are not as optimized as they should/could be,
+but the code is easier to follow, and it plays quick enough.
+<END>
+
+
+
+stars.main
+run a simple starfield example
+pygame.examples.stars.main(): return None
+
+A simple starfield example. You can change the center of
+perspective by leftclicking the mouse on the screen.
+<END>
+
+
+
+fonty.main
+run a font rendering example
+pygame.examples.fonty.main(): return None
+
+Super quick, super simple application demonstrating
+the different ways to render fonts with the font module
+<END>
+
+
+
+vgrade.main
+display a vertical gradient
+pygame.examples.vgrade.main(): return None
+
+Demonstrates creating a vertical gradient with
+Numeric python. The app will create a new gradient every half
+second and report the time needed to create and display the
+image. If you're not prepared to start working with the
+Numeric arrays, don't worry about the source for this one :]
+<END>
+
+
+
+arraydemo.main
+show various surfarray effects
+pygame.examples.arraydemo.main(): return None
+
+Another example filled with various surfarray
+effects. It requires the surfarray and image modules to
+be installed. This little demo can also make a good starting
+point for any of your own tests with surfarray
+
+The example will use NumPy by default, but will use Numeric
+as a alternative (New pygame 1.9.0).
+<END>
+
+
+
+sound.main
+load and play a sound
+pygame.examples.sound.main(file_path=None): return None
+
+Extremely basic testing of the mixer module. Load a
+sound and play it. All from the command shell, no graphics.
+
+If provided, use the audio file 'file_path', otherwise use a
+default file.
+
+sound.py optional command line argument: an audio file
+<END>
+
+
+
+liquid.main
+display an animated liquid effect
+pygame.examples.liquid.main(): return None
+
+This example was created in a quick comparison with the
+BlitzBasic gaming language. Nonetheless, it demonstrates a quick
+8-bit setup (with colormap).
+<END>
+
+
+
+glcube.main
+display an animated 3D cube using OpenGL
+pygame.examples.glcube.main(): return None
+
+Using PyOpenGL and pygame, this creates a spinning 3D
+multicolored cube.
+<END>
+
+
+
+scrap_clipboard.main
+access the clipboard
+pygame.examples.scrap_clipboard.main(): return None
+
+A simple demonstration example for the clipboard support.
+<END>
+
+
+
+
+mask.main
+display multiple images bounce off each other using collision detection
+pygame.examples.mask.main(*args): return None
+
+Positional arguments:
+    one or more image file names.
+
+This pygame.masks demo will display multiple moving sprites bouncing
+off each other. More than one sprite image can be provided.
+
+If run as a program then mask.py takes one or more image files
+as command line arguments.
+<END>
+
+
+
+
+teststrite.main
+show lots of sprites moving around
+pygame.examples.testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0): return None
+
+Optional keyword arguments:
+    update_rects - use the RenderUpdate sprite group class
+    use_static - include non-moving images
+    use_FastRenderGroup - Use the FastRenderGroup sprite group
+    screen_dims - pygame window dimensions
+    use_alpha - use alpha blending
+    flags - additional display mode flags
+
+Like the testsprite.c that comes with sdl, this pygame version shows 
+lots of sprites moving around.
+
+If run as a stand-alone program then no command line arguments are taken.
+<END>
+
+
+
+
+headless_no_windows_needed.main
+write an image file that is smoothscaled copy of an input file
+pygame.examples.headless_no_windows_needed.main(fin, fout, w, h): return None
+
+arguments:
+    fin - name of an input image file
+    fout - name of the output file to create/overwrite
+    w, h - size of the rescaled image, as integer width and height
+
+How to use pygame with no windowing system, like on headless servers.
+
+Thumbnail generation with scaling is an example of what you can do with pygame.
+
+NOTE: the pygame scale function uses mmx/sse if available, and can be run 
+in multiple threads.
+
+If headless_no_windows_needed.py is run as a program it takes the following
+command line arguments:
+    -scale inputimage outputimage new_width new_height
+    eg. -scale in.png outpng 50 50
+<END>
+
+
+
+
+overlay.main
+play a .pgm video using overlays
+pygame.examples.overlay.main(fname): return None
+
+Play the .pgm video fila a path fname.
+
+If run as a program overlay.py takes the file name as a command line argument.
+<END>
+
+
+
+
+scaletest.main
+interactively scale an image using smoothscale
+pygame.examples.scaletest.main(imagefile, convert_alpha=False, run_speed_test=True): return None
+
+arguments:
+    imagefile - file name of source image (required)
+    convert_alpha - use convert_alpha() on the surf (default False)
+    run_speed_test - (default False)
+
+A smoothscale example that resized an image on the screen.
+Vertical and horizontal arrow keys are used to change the width and
+height of the displayed image. If the convert_alpha option is True
+then the source image is forced to have source alpha, whether or
+not the original images does. If run_speed_test is True then a
+background timing test is performed instead of the interactive scaler.
+
+If scaletest.py is run as a program then the command line options are:
+    ImageFile [-t] [-convert_alpha]
+    [-t] = Run Speed Test
+    [-convert_alpha] = Use convert_alpha() on the surf.
+<END>
+
+
+
+midi.main
+run a midi example
+pygame.examples.midi.main(mode='output', device_id=None): return None
+
+Arguments:
+    mode - if 'output' run a midi keyboard output example
+              'input' run a midi event logger input example
+              'list' list available midi devices
+           (default 'output')
+    device_id - midi device number; if None then use the default midi input or
+                output device for the system
+
+The output example shows how to translate mouse clicks or computer keyboard
+events into midi notes. It implements a rudimentary button widget and state
+machine.
+
+The input example shows how to translate midi input to pygame events.
+
+With the use of a virtual midi patch cord the output and input examples can
+be run as separate processes and connected so the keyboard output is displayed
+on a console.
+
+new to pygame 1.9.0
+<END>

File src/pygamedocs.h

 
 #define DOC_PYGAMEEVENTEVENT "pygame.event.Event(type, dict): return Event\npygame.event.Event(type, **attributes): return Event\ncreate a new event object"
 
+#define DOC_PYGAMEEXAMPLES "module of example programs"
+
+#define DOC_PYGAMEEXAMPLESALIENSMAIN "pygame.aliens.main(): return None\nplay the full aliens example"
+
+#define DOC_PYGAMEEXAMPLESOLDALIENMAIN "pygame.examples.oldalien.main(): return None\nplay the original aliens example"
+
+#define DOC_PYGAMEEXAMPLESSTARSMAIN "pygame.examples.stars.main(): return None\nrun a simple starfield example"
+
+#define DOC_PYGAMEEXAMPLESFONTYMAIN "pygame.examples.fonty.main(): return None\nrun a font rendering example"
+
+#define DOC_PYGAMEEXAMPLESVGRADEMAIN "pygame.examples.vgrade.main(): return None\ndisplay a vertical gradient"
+
+#define DOC_PYGAMEEXAMPLESARRAYDEMOMAIN "pygame.examples.arraydemo.main(): return None\nshow various surfarray effects"
+
+#define DOC_PYGAMEEXAMPLESSOUNDMAIN "pygame.examples.sound.main(file_path=None): return None\nload and play a sound"
+
+#define DOC_PYGAMEEXAMPLESLIQUIDMAIN "pygame.examples.liquid.main(): return None\ndisplay an animated liquid effect"
+
+#define DOC_PYGAMEEXAMPLESGLCUBEMAIN "pygame.examples.glcube.main(): return None\ndisplay an animated 3D cube using OpenGL"
+
+#define DOC_PYGAMEEXAMPLESSCRAPCLIPBOARDMAIN "pygame.examples.scrap_clipboard.main(): return None\naccess the clipboard"
+
+#define DOC_PYGAMEEXAMPLESMASKMAIN "pygame.examples.mask.main(*args): return None\ndisplay multiple images bounce off each other using collision detection"
+
+#define DOC_PYGAMEEXAMPLESTESTSTRITEMAIN "pygame.examples.testsprite.main(update_rects = True, use_static = False, use_FastRenderGroup = False, screen_dims = [640, 480], use_alpha = False, flags = 0): return None\nshow lots of sprites moving around"
+
+#define DOC_PYGAMEEXAMPLESHEADLESSNOWINDOWSNEEDEDMAIN "pygame.examples.headless_no_windows_needed.main(fin, fout, w, h): return None\nwrite an image file that is smoothscaled copy of an input file"
+
+#define DOC_PYGAMEEXAMPLESOVERLAYMAIN "pygame.examples.overlay.main(fname): return None\nplay a .pgm video using overlays"
+
+#define DOC_PYGAMEEXAMPLESSCALETESTMAIN "pygame.examples.scaletest.main(imagefile, convert_alpha=False, run_speed_test=True): return None\ninteractively scale an image using smoothscale"
+
+#define DOC_PYGAMEEXAMPLESMIDIMAIN "pygame.examples.midi.main(mode='output', device_id=None): return None\nrun a midi example"
+
 #define DOC_PYGAMEFONT "pygame module for loading and rendering fonts"
 
 #define DOC_PYGAMEFONTINIT "pygame.font.init(): return None\ninitialize the font module"