#!/usr/bin/python from Tkinter import* from PIL import Image, ImageTk class Application(Frame): def __init__(self, master=None): Frame.__init__(self, master) self.grid() self.createWidgets() def exitapp(self, event): command=self.quit() def createWidgets(self): # pick an image file you have .bmp .jpg .gif. .png # load the file and covert it to a Tkinter image object self.imageFile = "/home/dave/emc2/nc_files/hudsondoor2.bmp" self.image1 = ImageTk.PhotoImage(Image.open(self.imageFile)) self.label1 = Label(text="Press 'ENTER' to Close the Window") self.label1.grid(padx=0,pady=2) self.label1 = Label(image=self.image1) self.label1.grid(padx=0,pady=0) self.okButton = Button (self, text="OK", command=self.quit) self.okButton.grid(padx=0,pady=5) self.okButton.focus() self.okButton.bind("", self.exitapp) app = Application() app.master.title("DOOR PLACEMENT") app.mainloop()