메뉴 건너뛰기

Hello :0

[Python] py2exe

2017.02.02 22:46

Leekyu 조회 수:82

#setup.py
 
from distutils.core import setup
import py2exe
 
options = {
    "bundle_files": 1,                 # create singlefile exe
    "compressed"  : 1,                 # compress the library archive
    "optimize"    : 2,                 # do optimize
}
 
setup(
    console = ["code.py"],             # py file to create exe
    options = {"py2exe" : options},
    zipfile = None                     # append zip-archive to the executable    
)


#python -u Setup.py py2exe