📅  最后修改于: 2022-03-11 14:47:23.638000             🧑  作者: Mango
import tkinter as tk
root = tk.Tk()
root.tk.call('wm', 'iconphoto', root._w, tk.PhotoImage(file='/path/to/ico/icon.png')
root.mainloop()