rendered paste body#!/usr/bin/python# menu-example-2.pyfrom Tkinter import *import tkMessageBoximport tkFileDialogroot = Tk()def mount(): filename = tkFileDialog.askopenfilename() try: if filename: print "finns" except: print 'Finns ej' def information(): tkMessageBox.showwarning("Information", "Information kommer här")# Menumenubar = Menu(root)menubar.add_command(label="Mount Iso", command=mount)menubar.add_command(label="Information", command=information)def callback(): if tkMessageBox.askyesno("Quit", "Do you really wish to quit?"): root.destroy()# Orkaget = 'MountXiso version 0.5'root.config(menu=menubar)root.protocol("WM_DELETE_WINDOW", callback)root.geometry("%dx%d" % (400, 100))root.title(get)mainloop()