py2exe를 통한 python 컴파일
프로그래밍/파이썬 2009. 6. 17. 16:34 |http://sourceforge.net/project/downloading.php?group_id=15583&filename=py2exe-0.6.9.win32-py2.5.exe
에서 다운로드 한 후 설치한다.
에서 다운로드 한 후 설치한다.
아래와 같은 파이썬 파일을 만든 후 컴파일 한다.
from distutils.core import setup
import py2exe
import py2exe
setup(
console=["result.py"]
#windows=["window.py"] # 윈도우 모드일 때
)
#windows=["window.py"] # 윈도우 모드일 때
)
실행은 python setup.py py2exe 와 같은 형태로 할 수 있다.
from distutils.core import setup
import py2exe
import py2exe
setup(
options = {"py2exe": {"packages": [encodings"]}},
console=["result.py"]
options = {"py2exe": {"packages": [encodings"]}},
console=["result.py"]
)
추가 : 단일파일 컴파일
http://soooprmx.com/wp/archives/976