py2exe简单使用

1、首先下载已安装的对应Python版本的py2exe
2、将写好的程序拷入类似文件夹
C:\Python26\Lib\site-packages\py2exe\samples
3、假设写好的程序全部放在capturer文件夹中
4、编写setup.py
如下:


from distutils.core import setup
import py2exe

setup(
# The first three parameters are not required, if at least a
# 'version' is given, then a versioninfo resource is built from
# them and added to the executables.
version = "0.5.0",
description = "py2exe sample script",
name = "py2exe samples",

# targets to build
windows = ["main.py"]#main.py为项目主程序文件
)


5、在doc命令行中进入
C:\Python26\Lib\site-packages\py2exe\samples\capturer
6、运行
Python setup.py py2exe
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值