Python py2exe packaging tool details, pythonpy2exe Packaging

Source: Internet
Author: User

Python py2exe packaging tool details, 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:

# _ * _ Coding: UTF-8 _ * _ import py2exefrom distutils. core import setupshortdes = ['encoding', 'enabings. * '] options = {'py2exe': {'compressed ': 1, 'optimize': 2, 'ascii': 1, 'shortde': shortde, 'bundle _ files': 1, 'dll _ excludes ': ['msvcp90. dll '],} setup (version = '1. 0.0 ', description = 'search file', name = 'search file', options = options, zipfile = None, windows = [{'script': 'core \ tool. py', # main file path of the program to be packaged 'icon _ resources': [(1, 'Resource \ icon. ico ')], # path of the program icon}],)

The above Python py2exe packaging tool is a small part of the content to share with you, I hope to give you a reference, but also hope you can support a lot of help home.

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.