How to distribute python console program

Nicholas Cole nicholas.cole at gmail.com
Sun Jun 22 05:58:22 EDT 2014


On Sun, Jun 22, 2014 at 3:51 AM, Nicholas Cannon
<nicholascannon1 at gmail.com> wrote:
> I have a simple program that is ran in the console with 2 modules and i was wondering how i could like export it so i could give it to someone to use as like a utlitie in the console?

I'm assuming that the 'someone' you want to give it to has python
installed (if they are running any kind of linux or OS X they should
do).

If so, you can use something like

https://pypi.python.org/pypi/ncdistribute/

to make single zip file that contains your code and all its
dependencies.  There is no need to unpack the zip file - python can
run it without unpacking, so you simply put the your_utility_name.pyz
file somewhere in the user's path and it can be run easily.  You can
even rename it so that it doesn't have the .pyz filename.

If you want to send your application to someone who doesn't have
python installed, things are trickier.

http://cx-freeze.sourceforge.net

aims to help you do that kind of thing.

Hope that helps,

Nicholas



More information about the Python-list mailing list