Pastebin launched a little side project called VERYVIRAL.com, check it out ;-) Want more features on Pastebin? Sign Up, it's FREE!
Guest

Pyry

By: a guest on Feb 21st, 2009  |  syntax: Python  |  size: 0.57 KB  |  views: 120  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. import pygame, sys,os
  2. from pygame.locals import *
  3.  
  4. pygame.init()
  5.  
  6. window = pygame.display.set_mode((468, 60))
  7. pygame.display.set_caption('Monkey Fever')
  8. screen = pygame.display.get_surface()
  9.  
  10. monkey_head_file_name = os.path.join("data","chimp.bmp")
  11.  
  12. monkey_surface = pygame.image.load(monkey_head_file_name)
  13.  
  14. screen.blit(monkey_surface, (0,0))
  15. pygame.display.flip()
  16.  
  17. def input(events):
  18.    for event in events:
  19.       if event.type == QUIT:
  20.          sys.exit(0)
  21.       else:
  22.          print event
  23.  
  24. while True:
  25.    input(pygame.event.get())