Python py2exe packaging tool, pythonpy2exe Packaging
Download the corresponding Python version of py2exe. You can use this tool to package your own program into an exe file.
To use this tool, you need to write a setup for packaging. py file (the name can be set by yourself, not necessarily setup. py), and then cd to the directory of the file on the command prompt interface, and execute the command "python setup. "py py2exe" can be packaged.
The following is a reference written by other netizens for your reference:
1 # _ * _ coding: UTF-8 _ * _ 2 import py2exe 3 from distutils. core import setup 4 5 events des = ['encoding', 'enabings. * '] 6 options = {'py2exe': 7 {'compressed ': 1, 8 'optimize': 2, 9 'ascii': 'shortde': pair des, 11 'bundle _ files': 'dll _ excludes ': ['msvcp90. dll '], 13} 14} 15 16 setup (version = '1. 0.0 ', 17 description = 'search file', 18 name = 'search file', 19 options = options, 20 zipfile = None, 21 windows = [{'script ': 'Core \ tool. py', # The main file path of the program to be packaged is 22 'icon _ resources': [(1, 'Resource \ icon. ico ')], # The image path of the program icon 23}], 24)