1. pygame
  2. Untitled project
  3. pygame


pygame / examples / moveit.py

Diff from to

File examples/moveit.py

 #!/usr/bin/env python
+This is the full and final example from the Pygame Tutorial,
+"How Do I Make It Move". It creates 10 objects and animates
+them on the screen.
+Note it's a bit scant on error checking, but it's easy to read. :]
+Fortunately, this is python, and we needn't wrestle with a pile of
+error codes.
 __docformat__ = 'restructuredtext'
     scaled_buf = scaled.pixels
     scaled_pitch = scaled.pitch / scaled.format.BytesPerPixel
-    print scaled_pitch
     background_buf = background.pixels
     background_pitch = background.pitch / background.format.BytesPerPixel
-    print scaled.format.BytesPerPixel, background.format.BytesPerPixel
     for y in range(scaled.h):
         for x in range(scaled.w):
             scaled_buf[y * scaled_pitch + x] = \