from distutils.core import setup
import py2exe
import sys
import os
import os.path
sys.argv.append('py2exe')
setup(options={'py2exe': {'bundle_files': 1, 'compressed': False,
    'unbuffered': False, 'includes': ['Tkinter', 'Tkconstants'], 'excludes':
    ['tcl'], 'optimize': 0, 'packages': [], 'dist_dir': 'foo',
    'dll_excludes': ['tcl85.dll', 'tk85.dll']}}, windows=['foo.py'],
    zipfile=None, data_files=[os.path.join(sys.prefix, 'DLLs', f) for f in
    os.listdir(os.path.join(sys.prefix, 'DLLs')) if f.lower().startswith((
    'tcl', 'tk')) and f.lower().endswith(('.dll',))])
Python py2exe window showing (tkinter)