Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Make a py2exe exe run without a console?

Tags:

python

py2exe

Does anyone know how to make an exe with py2exe run without the black console? and bundle up all the pyd files etc into just one exe file?

like image 388
P'sao Avatar asked Jun 25 '11 21:06

P'sao


1 Answers

For one exe file, use this setup (taken from this answer):

from distutils.core import setup
import py2exe, sys, os

sys.argv.append('py2exe')

setup(
    options = {'py2exe': {'bundle_files': 1, 'compressed': True}},
    windows = [{'script': "single.py"}],
    zipfile = None,
)
like image 180
Joel Christophel Avatar answered Sep 19 '22 13:09

Joel Christophel