Distribution of Python Scripts

T

tazz_ben

Hi Folks -

I'm an experienced programmer, but this is my first app with python,
so I apologize for any stupidity on my part. So I've written/still
working on a command line tool written in Python. It talks to a web
service, so there really isn't anything in it that is dependent on a
particular os. My goal is to distribute the script as a tool to my
users so they can use it (they are on multiple platforms), the vast
majority are not programmers.

So, I'm looking for a way to distribute the app that takes care of
details like them having python installed, or having an older version
etc. From reading some docs it sounds like "Squeeze" did exactly this
back in the day, but it is ancient and I'm writing in 2.7. Just to
be clear I could care less if they see the source code, my goal is all
around ease of use. I would love to have one distribution file for
all platforms, but I can live with making three if that's the only
option.

So, what's my options.
 
S

Steve Holden

Hi Folks -

I'm an experienced programmer, but this is my first app with python,
so I apologize for any stupidity on my part. So I've written/still
working on a command line tool written in Python. It talks to a web
service, so there really isn't anything in it that is dependent on a
particular os. My goal is to distribute the script as a tool to my
users so they can use it (they are on multiple platforms), the vast
majority are not programmers.

So, I'm looking for a way to distribute the app that takes care of
details like them having python installed, or having an older version
etc. From reading some docs it sounds like "Squeeze" did exactly this
back in the day, but it is ancient and I'm writing in 2.7. Just to
be clear I could care less if they see the source code, my goal is all
around ease of use. I would love to have one distribution file for
all platforms, but I can live with making three if that's the only
option.

So, what's my options.

The only one I could find was cxFreeze:

http://cx-freeze.sourceforge.net/

regards
Steve
 
J

Jean-Michel Pichavant

tazz_ben said:
Hi Folks -

I'm an experienced programmer, but this is my first app with python,
so I apologize for any stupidity on my part. So I've written/still
working on a command line tool written in Python. It talks to a web
service, so there really isn't anything in it that is dependent on a
particular os. My goal is to distribute the script as a tool to my
users so they can use it (they are on multiple platforms), the vast
majority are not programmers.

So, I'm looking for a way to distribute the app that takes care of
details like them having python installed, or having an older version
etc. From reading some docs it sounds like "Squeeze" did exactly this
back in the day, but it is ancient and I'm writing in 2.7. Just to
be clear I could care less if they see the source code, my goal is all
around ease of use. I would love to have one distribution file for
all platforms, but I can live with making three if that's the only
option.

So, what's my options.
I've never done that before. So maybe I will give you a very bad idea,
but if so, I'm confident that ppl in this list will scream about it :)

You can ship your app with python (the executable) and the module you're
using as local modules.

Let's assume you are importing sys and os:

myApp/python.exe
myApp/myScript.py
myApp/os/__init__.py -> actually the whole package
myApp/sys/__init__.py

If you see what I mean.

by running python.exe myScript.py ... That should work.

You'll have to include every single module you are using. Only
python.exe would required to be platform specific.

Maybe that's a terrible thing to do... :D

JM
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,230
Members
46,819
Latest member
masterdaster

Latest Threads

Top