[ create a new paste ] login | about

Link: http://codepad.org/3iMkjbT8    [ raw code | output | fork ]

Python, pasted on Mar 5:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import pygame
from pygame.locals import *
import sys

SCREEN_SIZE = (640,480)

pygame.init()
screen = pygame.display.set_mode(SCREEN_SIZE)
pygame.display.set_caption("test")

while True:
    screen.fill((0,0,0))
    pygame.display.update()
    for event in pygame.event.get():
        if event.type == QUIT:sys.exit
        if event.type == KEYDOWN and event.key == K_ESCAPE:sys.exit()
        if event.type == KEYDOWN and event.key == K_q:sys.exit()


Output:
1
2
3
4
Traceback (most recent call last):
  Line 1, in <module>
    import pygame
ImportError: No module named pygame


Create a new paste based on this one


Comments: