Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/python/281.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
python tkinter窗口的应用程序徽标_Python_Tkinter - Fatal编程技术网

python tkinter窗口的应用程序徽标

python tkinter窗口的应用程序徽标,python,tkinter,Python,Tkinter,我想有一个file.ico文件,我想把它作为我的应用程序徽标。它类似于html中的favicon 这是结束代码: root = Tk() root.title("Blacky Birds") root.resizable(0,0) root.configure(bg="forestgreen") game = SqBoard(root, width=16, height=16, letters=10) game.mainloop() 我不确定,但猜测它将在我的文件的这一部分。应该是一个类似ro

我想有一个file.ico文件,我想把它作为我的应用程序徽标。它类似于html中的favicon

这是结束代码:

root = Tk()
root.title("Blacky Birds")
root.resizable(0,0)
root.configure(bg="forestgreen")
game = SqBoard(root, width=16, height=16, letters=10)
game.mainloop()
我不确定,但猜测它将在我的文件的这一部分。应该是一个类似root.icon(PhotoImage(file.ico))或类似的单行程序。请帮帮我。我正在使用Python3.4.2和Tkinter作为Gui。非常感谢

root.iconbitmap('favicon.ico')