1

I wrote a program in Python with GUI based on Tkinter and convert them to standalone windows program using Py2Exe, and now i have a big folder with help files and one .exe file.

Do you know any method to pack it all to one .exe file? Thanks.

Roman Nazarkin
  • 2,209
  • 5
  • 23
  • 44
  • Looks like this question.http://stackoverflow.com/questions/112698/py2exe-generate-single-executable-file – gary Apr 21 '13 at 10:48

1 Answers1

2

You have to setup a build script with zipfile = None in the config:

import py2exe, sys
from distutils.core import setup

sys.argv.append('py2exe')

setup(
    options = {
        'py2exe': {
            'verbose': True,
            'bundle_files': 1,
            'compressed': True,
            'dll_excludes': ['MSVCP90.dll', 'HID.DLL', 'w9xpopen.exe']
        }
    },
    windows = [{'script': "main.py"}],
    zipfile = None,
)

This will create a single executable.

Blender
  • 289,723
  • 53
  • 439
  • 496