aF. aF. - 2 months ago 28
Python Question

How to make an executable file in Python?

I want to make an executable file (.exe) of my Python application.

I want to know how to do it but have this in mind: I use a C++ DLL!

Do I have to put the DLL along side with the .exe or is there some other way?


py2exe can generate single file executables. see this link for examples.

The I use uses the following combination of options:

'compressed': 1,
 'bundle_files': 1

I usually add external dlls (p.e. msvcr71.dll) in the same folder where the executable is.

To facilitate distribution and to automate installation after generating your exe you can use Inno Setup to create an installer that puts your exe and your dlls, and other documents (readme, etc) into the application directory