I have made a sample GUI using Python 2.7 and tkinter.., converted .py to .exe through py2exe, now if i link only the .exe file on my website for download , after downloading the exe file doesn't open since it needs dll and other files to execute, so how do I link the entire folder containing dll and other files to the href tag so that whenever user clicks on download the entire folder gets downloaded...
Edit: Found a solution (thanks to the guys below in comments)
So i used pyinstaller and executed the file in command line using the command :
pyinstaller -w -F Filename
so this command bundles all the dll and other files into a single exe ;)
also in order to include images in the exe, i added this in the main script :
def resource_path(relative_path):
""" Get absolute path to resource, works for dev and for PyInstaller """
try:
# PyInstaller creates a temp folder and stores path in _MEIPASS
base_path = sys._MEIPASS
except Exception:
base_path = os.path.abspath(".")
return os.path.join(base_path, relative_path)
and also made changes in the spec file