#!/usr/bin/python
############
# My_Window.py
# This program creates a Pygame Window
# With a simple event queue
############ 

import os, sys
import pygame
from pygame.locals import*

pygame.init()
def draw_stuff(My_Window):
	My_Background = pygame.Surface(My_Window.get_size())
	My_Background = My_Background.convert() 
	My_Background.fill((220,220,80))	
	pygame.draw.line (My_Background, (0,0,0,),(0,240),(640,240), 5)
	pygame.draw.line (My_Background, (0,0,0), (320,0), (320,480), 5)
	return My_Background
My_Window = pygame.display.set_mode((640, 480))


still_playing = 1
while (still_playing==1):
	for event in pygame.event.get():
		if event.type is QUIT:
			still_playing = 0
		My_Display = draw_stuff(My_Window)
		My_Window.blit(My_Display, (0,0))
		pygame.display.flip()
