All pastes #369093 Raw Edit

Untitled

public python v1 · immutable
#369093 ·published 2007-02-23 15:46 UTC
rendered paste body
#myfirstgame.pyAPP_TITLE="Data's First \"Game\""import windowsimport client, footer#client.pyimport myfirstgame, pygame, os, sys, windowsfrom myfirstgame import *from pygame.locals import *datafiles=["","grass.png","human_male.png","human_female.png","icon.png"]for data in datafiles:	if not os.access(os.path.join("data",data),os.R_OK):		err=windows.tkError(master=tkroot,msg="Could not locate the file \""+data+"\" in the data directory.") #error line: AttributeError		err.master.title(APP_TITLE)		err.mainloop()		sys.exit(0)... #everything irrelevant#windows.pyimport myfirstgamefrom myfirstgame import *from Tkinter import *class tkError(Frame):    def createWidgets(self):	self.MSG = Label(self)	self.MSG["text"]=self.msg	self.MSG.pack({"side": "top"})        self.QUIT = Button(self)        self.QUIT["text"] = "OK"        self.QUIT["command"] =  self.quit        self.QUIT.pack({"side": "bottom"})    def __init__(self, master=None, msg=None):	self.msg=msg        Frame.__init__(self, master)        self.pack()        self.createWidgets()tkroot = Tk()#footer.pyimport myfirstgame, windowsfrom myfirstgame import *windows.tkroot.destroy()