The method of calling DLLs in Python and merging DLLs and Python into one EXE file

Source: Internet
Author: User

I believe a lot of friends who learn to use Python want to package Python programs into an EXE file, which avoids the need to install the Python runtime environment when the program is published. There are many programs that can help us do this, such as Py2exe,pyinstaller,cxfreeze.

Only Cxfreeze supports 3.x versions, and Cxfreeze does not support the packaging of all files to an EXE. 3.x versions of Python are larger than 2.x, so developers are advised to use 2.X versions.

Py2exe can be packaged in a Python program's runtime and dependent libraries into an EXE file. This can solve most people's problems. But if you use the cTYPES to call the DLL, how do you get the DLL file in? One way to do this is to use the self-extracting method to compress all files with RAR, and to configure self extracting. But there is a flaw in this, that is, will create two processes, one is the decompression program, the second is their own program. The author tried a lot of ways not to do only one process and the DLL file into the package.

The method of calling DLLs in Python and merging DLLs and Python into one EXE file

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.