I have been combing Stack Overflow and the rest of the web on how to add data files into my python application:
import Tkinter
class simpleapp_tk(Tkinter.Tk):
def __init__(self,parent):
Tkinter.Tk.__init__(self,parent)
self.parent = parent
self.initialize()
def initialize(self):
self.grid()
--- Everything Fine Here ---
self.B = Tkinter.Button(self, text = 'Create Document', command = self.OnButtonClick)
self.B.grid(column = 0, row = 6)
def OnButtonClick(self):
createDoc()
if __name__ == "__main__":
app = simpleapp_tk(None)
app.title('Receipt Form')
app.iconbitmap(os.getcwd() + '/M.ico')
app.mainloop()
I have tried using the .spec file with no luck
Onedir works fine, however when I try to compile into a single executable, it gives an error that the file 'M.ico' isn't defined.
If anyone was able to bundle data files with pyinstaller into a single file. Please help. Thanks.
I am on a Windows 10 computer running Python 2.7 with PyInstaller 3.2