Skip to content Skip to sidebar Skip to footer

Distribute Python Code As Executable For Mac/windows/linux

I am working on an interesting tool which I feel has good value and may eventually want to open source it. However, till I decide, I want to keep it 'closed'. The problem is I wan

Solution 1:

Well, Python is a scripting language, so it's not quite possible to create real .exe file. However, you might want to compile your code to .pyc and then distribute your application. Running .pyc is the same as regular python file:

$ python code.pyc

compileall - http://docs.python.org/library/compileall.html#module-compileall Typical usage:

python -m compileall ./

I am not sure about decompilation issues, but I assume it's possible. Java .class files can be decompiled as well.

Post a Comment for "Distribute Python Code As Executable For Mac/windows/linux"