I have a Python script that I compile with Pyinstaller into one single .exe file. Unfortunately, both the script and the compiled file must be in the same directory as my .ico and background (.png) image, as I refer to them like this:
root.iconbitmap("logo.ico")
background = ImageTk.PhotoImage(Image.open("background.png"))
It is possible to include the picture data in the script file itself, instead of make it depended on a file outside the single executable file? I'm using Tkinter and PIL.