One executable to rule them all

Python is a glorious language; a decent amount of documentation (not as much as PHP and Java, but far more than any other language) plus a great library of built-in functions (easy GUI library built-in!) make programming in Python fun. The only headache I’ve discovered thus far is distribution. There are a few projects that exist which are designed to package all your python source code and necessary library files (DLLs on Windows, SOs on Unix/Linux) so you can distribute a folder containing all you need to run the program. Unfortunately, this turns a 2 KB PY file into a 2 MB distribution folder. I know that a lot is required to run a Python program, but this kind of ballooning can be discouraging.

One project, PyInstaller, seems to be able to package all the files together into a single executable and manages to keep the number of imported libraries down to those you actually use. I haven’t tested it on non-Windows, but it took a rudimentary chat-server I wrote and made a stand-alone executable out of it, which ran fine. I also haven’t tested the executable on a computer without Python installed to make sure it doesn’t have any dependencies. PyInstaller is a continuation of a similar installer written by Gordon McMillan whose website seems to have disappeared.

If this works out, I may be able to re-write some of my other useful applications in Python and make them easier to maintain and distribute.

The comment form is closed.

RSS feed for comments on this post · TrackBack URL