《PyInstaller打包实战指南》第八节 打包资源文件

第八节 打包资源文件

1.添加图片

2.添加可执行文件

3.添加压缩文件

4.添加其他文件(txt, excel, json, html...)

5.添加二进制文件 


在第三节的第一小节中,笔者打包了以下程序:

import tkinter

win = tkinter.Tk()
win.iconbitmap('./icon.ico')    # 设置窗口图标
win.mainloop()

之后我们认识到必须要将图标文件放在可执行文件路径下才能够正常运行。 

猜你喜欢

转载自blog.csdn.net/La_vie_est_belle/article/details/94058564