I have written a python code which displays a window using Tkinter. It also calls another python file present in the same folder. I converted the .py files into a .exe file using py2exe. But i am facing the below issues:
- The output (in dist folder) is a set of files and not a single executable file. - As per my understanding using the 'bundle_files':1,'compressed':True, i should be getting a single file.
- Now i have two .exe files and 1 folder: w9xpopen.exe,myframe.py(this is my file) and folder "tcl"
 
- As per my understanding using the 
- The icon is not changed. - I had mentioned "icon_resources":[(0,"icon.ico")]in the "windows" section
 
- I had mentioned 
Below is the setup.py i used:
from distutils.core import setup
import py2exe, glob,sys,os
sys.argv.append('py2exe')
setup(
  options={'py2exe':{'bundle_files':1,'compressed':True}},
  windows=[{"script":'hr_data_downloader.py',"icon_resources":   [(0,"icon.ico")]}],
 data_files = [],
 zipfile=None
)
I had issues running the executable at first but after going through the below posts, i corrected it by explicitly adding the two dlls.
Creating single EXE using py2exe for a Tkinter program
py2exe - generate single executable file
Please let me know if it is possible to create a single-file executable by modifying the setup files or any other py2exe files. Also please tell me why the icon is not shown for the created .exe
I am open to try other distribution utilities like py2exe if it can help me create single-file executable.
 
     
    