def load_image(file): "loads an image, prepares it for play" file = os_path_join('data', file) try: surface = pygame.image.load(file) except pygame.error: raise SystemExit, 'Could not load image "%s" %s'%(file, pygame.get_error()) return surface.convert()