#myfirstgame.py APP_TITLE="Data's First \"Game\"" import windows import client, footer #client.py import myfirstgame, pygame, os, sys, windows from 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.py import myfirstgame from 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.py import myfirstgame, windows from myfirstgame import * windows.tkroot.destroy()