我有一個Python腳本,我用Pyinstaller編譯成一個單一的.exe文件。不幸的是,無論是劇本和編譯的文件必須在同一目錄作爲我的.ICO和背景文件(.png)圖像,爲我指的是他們這樣的:在Python中包含圖片數據,可能嗎?
root.iconbitmap("logo.ico")
background = ImageTk.PhotoImage(Image.open("background.png"))
它可以包括圖片數據在腳本文件本身中,而不是使其依賴於單個可執行文件之外的文件?我正在使用Tkinter和PIL。
我相信這是在[此帖](http://stackoverflow.com/questions/14129405回答/ python-pyinstaller-and-include-icon-file) http://stackoverflow.com/questions/14129405/python-pyinstaller-and-include-icon-file – Jason
@Jason that's awesome ... I use pyinstaller所有的時間,並不知道關於這個 –