py2exe--the Python program into executable exe under Windows

Source: Internet
Author: User

First, install the Py2exe

Second, define a directory, put your Python file below, such as the addfilerandom.py file

Then create a new go.py file, placed in the same directory, with the following contents:

From Distutils.core Import Setup
Import Py2exe
Setup (console=[' addfilerandom.py ') #这里的内容每次都可以修改, depending on the name of the file

Third, run directly under CMD, enter the file directory where go.py is placed, enter: Python go.py py2exe

After that, you will start building the DLL files you need to run, and when you are done, you will generate two folders, one build, and one dist,dist is what you can publish.

OK, end, simple summary, so that you can forget to come back to see, Hee

py2exe--the Python program into executable exe under Windows

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.