This is the code I am running:
import tkinter
from pygame import mixer
root = tkinter.Tk()
mixer.init()
mixer.music.load(r'C:\Users\George\AppData\Local\Programs\Python\Python36-32\Scripts\Music\Am_lie_-_JY_Suis_Jamais_All_-Yann_Tiersen.wav')
mixer.music.play()
root.mainloop()
I convert this to windows .exe with py2exe giving:
pyinstaller -w -F -i "C:\Users\George\AppData\Local\Programs\Python\Python36-32\Scripts\test.ico" sound.py
What I want to do is make the wav file embedded in the python .exe after it has been compiled by py2exe so that it does not need the file if run from a different computer aside from the Sound.exe itself.
Is this possible?
I am completely new to python.
I found this code that maybe does the job but can't get it to work.
dfiles = [(".","Am_lie_-_JY_Suis_Jamais_All_-Yann_Tiersen.wav"])]
setup(
windows=[{'script':'filename.py'}],
data_files=dfiles,
options={'py2exe':{'bundle_files':1,'compressed':1}}
Any help is appreciated.