Python py2exe packaging tool, pythonpy2exe Packaging

Source: Internet
Author: User

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)

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.