#!/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/john/emc2/nc_files/message.png" self.image1 = ImageTk.PhotoImage(Image.open(self.imageFile)) self.label1 = Label(text="Press Enter to Close This Window", padx=10, pady=5) self.label1.grid() self.label1 = Label(image=self.image1) self.label1.grid() self.okButton = Button (self, text="OK", command=self.quit) self.okButton.grid() self.okButton.focus() self.okButton.bind("", self.exitapp) app = Application() app.master.title("Part Notice") app.mainloop()