A slight improvement: To center the window on the screen you could add the following after root.geometry("640x480"):
root.geometry("640x480")
##
#Add this to centre the window on the screen
w = 640
h = 480
x = root.winfo_screenwidth() // 2 - w // 2
y = root.winfo_screenheight() // 2 - h // 2
root.geometry('%dx%d+%d+%d' % (w, h, x, y))
##
Dialog(root, bk)
|