Sunday 2:30 p.m.–3 p.m.
The Day of the EXE Is Upon Us
- Audience level:
- Best Practices & Patterns
It was once quite painful to build your Python app as a single .exe file. Support forums filled with lamentations as users struggled with primitive tools. But today, two separate tools exist for compiling your Python to real machine language! Come learn about how one of the biggest problems in commercial and enterprise software has now been solved and how you can benefit from this achievement.
The creation of binary executables has traditionally not been well-supported in the Python ecosystem, whether because the community gravitated towards supporting open-source software patterns where release of the source code is not an issue, or because Python applications were so often deployed as services that customers accessed remotely instead of installing on their own machines. But the future has now arrived: there are not one, but *two* competing solutions that will compile your Python to a real executable — that carries neither your raw Python code nor easily disassemblable `.pyc` files inside! The talk will explore the features of Nuitka, built from the ground up to compile Python, and Cython, which is able to do exactly the same thing as a side-effect of its main purpose: to interface Python and C/C++ for scientists and engineers. How do they differ in their features and in the resulting executable? What limits does each project place on the code that you can compile and distribute, and on the third-party libraries that you will be able to use? The talk will include a background on the difference between compilation and interpretation; a look at the features of source code versus byte code versus machine language; and the performance, unexpected error messages, and lessons learned from using both Nuitka and Cython to compile executables for distribution to real customers!