rendered paste body#imports libraries
import pygame, os, sys
from pygame.locals import *
#variables
background = os.path.join(os.path.dirname(__file__), 'starfield1.bmp')
pygame.init()
#the window
window = pygame.display.set_mode ((800, 600))
pygame.display.set_caption('Galaga!')
screen = pygame.display.get_surface()
#creating the surface
surface = pygame.image.load (background)
def input(events):
for event in events:
if event.type == QUIT:
sys.exit(0)
while True:
input (pygame.event.get())
screen.blit (surface, (0,0))
pygame.display.flip()