from tkinter import * from login import Application as login if __name__ == '__main__': win = Tk() win.title('超市') w=800 h=540 sw=win.winfo_screenwidth() sh=win.winfo_screenheight() x=(sw-w)/2 y=(sh-h)/2 win.geometry('%dx%d+%d+%d' % (w,h,x,y)) win.resizable(width=False, height=False) login(master=win) win.mainloop()