import pygame

class graphicsScreen:
    def __init__(self, xsize, ysize):
        try:
            pygame.init()
            self.size = self.width, self.height = xsize, ysize
            self.screen = pygame.display.set_mode(self.size)
            pygame.display.update()
        except Exception, e:
            print str(e)

    def clear(self):
        self.screen.fill((255,255,255))

    def plot(self, pos, color):
        pygame.Surface.set_at(self.screen, pos, color)
        
    def update(self):
        pygame.display.update()

    def wait(self):
        while pygame.event.get()<>None:
            pass
