py2exe 转换 pytetris
来源:互联网 发布:花洒选购 知乎 编辑:程序博客网 时间:2024/06/10 08:26
首先,需要一个给 py2exe 使用的 python 脚本,我命名为 setup.py,内容如下:
1from distutils.core import setup
2import glob, shutil
3import py2exe
4setup(windows=["main.py"])
5shutil.copytree('SFX', 'dist/SFX')
6shutil.copytree('Image', 'dist/Image')
7shutil.copyfile('C:/Python25/Lib/site-packages/pygame/freesansbold.ttf', 'dist/freesansbold.ttf')
2import glob, shutil
3import py2exe
4setup(windows=["main.py"])
5shutil.copytree('SFX', 'dist/SFX')
6shutil.copytree('Image', 'dist/Image')
7shutil.copyfile('C:/Python25/Lib/site-packages/pygame/freesansbold.ttf', 'dist/freesansbold.ttf')
并对 main.py 做简单的处理
1#font = pygame.font.Font(None, 40)
2 font = pygame.font.Font('freesansbold.ttf', 40)
2 font = pygame.font.Font('freesansbold.ttf', 40)
最后,执行如下命令:
python setup.py py2exe
.........................................................
关于 py2exe
简介
py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation.
py2exe is a Python Distutils extension which converts Python scripts into executable Windows programs, able to run without requiring a Python installation.
下载
http://sourceforge.net/projects/py2exe/
http://sourceforge.net/projects/py2exe/
- py2exe 转换 pytetris
- py2exe转换参数
- py2exe
- py2exe
- py2exe
- py2exe
- py2exe
- py2exe
- py2exe
- Py2exe
- py2exe
- 实战py2exe,将docutils转换为EXE
- 实战py2exe,将docutils转换为EXE
- 实战py2exe 将docutils转换为EXE [转]
- 使用py2exe将python3程序转换成exe文件
- Python程序转换为exe程序,py2exe的使用方法
- Python程序转换为exe程序,py2exe的使用方法
- 关于python中将py文件转换成exe文件的问题(使用py2exe)
- 方法我函数
- 网站编译遇到的问题
- 由滤波器系数绘制尺度函数和小波函数图像的Matlab程序
- dwwin.exe
- 转载-sprintf你知道多少
- py2exe 转换 pytetris
- 人生的35个好习惯(收藏)
- Visual C#通过信史服务实现网络信息传送的具体实现步骤 :
- 详细解析Java多线程技术中所有方法
- DxDebugService.exe
- dxdllreg.exe
- 王老师送学生的40句话
- X-MUD
- 解放了