# coding: utf-8 from tkinter import * import tkinter.filedialog from PIL import Image,ImageTk import os def CALSIZE(ppix,img): width=0 height=0 if img.size[0]<=ppix and img.size[1]= 1.0: # grid_remove is currently missing from Tkinter! self.tk.call("grid", "remove", self) else: self.grid() Scrollbar.set(self, lo, hi) # def pack(self, **kw): # raise TclError, "cannot use pack with this widget" # def place(self, **kw): # raise TclError, "cannot use place with this widget" #-------------------------------------------------------- root = Tk() menu = Menu() root.config(menu=menu) file_menu = Menu(menu, tearoff=0) file_menu.add_command(label='Open', command=NEXTVIEW) file_menu.add_separator() file_menu.add_command(label='Exit', command=root.destroy) menu.add_cascade(label='File', menu=file_menu) root.mainloop()