py2exe: 这个是将python脚本转化成exe的工具, 注意它的版本要与python相对应。
python: 这个是脚本解释器:
可去http://www.python.org上下载。
制作exe的方法:
可参考: http://www.py2exe.org/index.cgi/Tutorial
1. 首先编写 hello.py.
print "hello world."
2. 编写setup.py:
1 from distutils.core import setup
2 import py2exe
3
4 setup(console=['hello.py'])
3. 制作exe程序:
python setup.py py2exe
python编译: 它可以编译成跨平台的编译码:
from py_compile import compile
from py_compile import compile_dir
compile('file.py'); #会生成file.pyc
compile_dir(r"dir_path"); #批量编译py
py2exe打包pygtk程序:
http://math.suda.edu.cn/fliu/showarticle.php?a=1008
py2exe打包pyqt程序:
http://hi.baidu.com/cyclone/blog/item/bd26d688160c6f99a4c272c0.html