代码 import os from PIL import Image import tkinter import tkinter.filedialog import tkinter.messagebox class Window(): def __init__(self): self.root = root = tkinter.Tk() self.menu = tkinter.Menu(root) self.submenu = tkinter.Menu(self.menu, tearoff=0) self.submenu.add_command(label