Python Packaging-py2exe use

Source: Internet
Author: User

Py2exe 64-bit: http://download.csdn.net/detail/henujyj/8532827

Py2exe 32-bit: https://sourceforge.net/projects/py2exe/files/

The result of the following program is to package the hello.py program into a hello.exe executable file

The first step is to write the hellp.py:

# -*_coding:utf-8-*- Import Tkinter  from Import*= Tk () a.wm_title ('GUI ' I love Python . ' ) B.pack () A.mainloop ()

Step two, write the mysetup.py file

windows=["myscript.py"] replaced with console=["helloworld.py"] is the console program.

 from Import Setup Import py2exesetup (Windows=['hello.py')

The third step is to copy this file to the Python installation root directory.

Fourth step, DOS execute the following command

D:\Program Files\python27>python mysetup.py Py2exe

Fifth step, in the Dist folder, you see the

Sixth step, run

Python Packaging-py2exe use

Related Article

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.