python : py2exe

编辑好改文件后,使用py2exe将Python脚本编译成Windows可执行文件,就不需要Python解释器
要使用py2exe,首先要编写一个编译脚本,然后通过Python运行编译脚本即可将其他的脚本编译成可执行文件

#!/usr/bin/python  
# -*- coding: utf-8 -*-  
  
'''打包生成exe文件'''  
  
from distutils.core import setup
import py2exe   

setup(console = ["reminder.py"])
发布了25 篇原创文章 · 获赞 2 · 访问量 806

猜你喜欢

转载自blog.csdn.net/yangjinjingbj/article/details/104066069