from distutils.core import setup
import py2exe
import sys
# no arguments
if len(sys.argv) == 1:
sys.argv.append("py2exe")
def compile(appName, console=False):
OPTIONS = {"py2exe":
{"compressed": 1, "optimize": 0, "bundle_files": 1, } }
ZIPFILE = None
import py2exe
import sys
# no arguments
if len(sys.argv) == 1:
sys.argv.append("py2exe")
def compile(appName, console=False):
OPTIONS = {"py2exe":
{"compressed": 1, "optimize": 0, "bundle_files": 1, } }
ZIPFILE = None
if console:
setup(
options=OPTIONS,
zipfile=ZIPFILE,
console=[appName]
)
else:
setup(
options=OPTIONS,
zipfile=ZIPFILE,
windows=[appName]
)
compile(‘example.py’)
setup(
options=OPTIONS,
zipfile=ZIPFILE,
console=[appName]
)
else:
setup(
options=OPTIONS,
zipfile=ZIPFILE,
windows=[appName]
)
compile(‘example.py’)