the general development using Python

C

CM

I was mainly talking in the context of the original post, where it
seems something slightly different was meant. If you're deploying to
customers, you'd want to offer them an installer. At least, I think
you would. That's different from packing Python into a .exe file and
pretending it's good-to-go.

It depends. In some sense, probably an .exe is the very simplest thing youcan provide a user: they download and move it to where they want, the click on it, it runs. It *is* good-to-go, isn't it? (btw, I know at least one person I've read on a forum who just won't use any installer--he feels it can put stuff on his computer where he doesn't have good easy control of it.)

Sometimes an installer might be preferable, especially if there are data orimage files or tutorials or something that go with the .exe (that weren't,for some reason, bundled inside it).
If they don't want it installed, again the best thing to do is an
archive with some "executable" (possibly a batch file or something --
you Windows people would know better what you need) that just runs
"python main_file.py". Then get them to extract + click. That's 2
operations, and a lot faster than some silly install process.

But that's pretty much what the .exe that py2exe makes does anyway. It just kind of hides it all inside the .exe file.
There are a lot of ways of making an installer, and my current few
Googles have shown that distutils comes with a way of making .msi
files¹, and there's also http://wix.tramontana.co.hu/. Some random
internet guy reccomended https://code.google.com/p/omaha/, but I've no
idea if it's appropriate. There's also
http://nsis.sourceforge.net/Main_Page. Again, I'm no Windows user so
I'm talking by guessing.

And InnoSetup, which I've used to good effect.
These are saner solutions because they focus on installing rather than
pretending that a .exe file with a packaged Python is anything like a
compiled C source.

I don't think most informed users of, say, py2exe think that. I think theysee it as "freezing" the application for single-file portability. The fact that people will refer to it as "compiling it to an exe" is unfortunate, yes.

Again, for anyone selling software, just make as few steps as possible for the user. Using py2exe (which is easy to do) to freeze a lot of .py scripts into one easily deployed app passes that test. So does any simple methodyou mentioned, I'm sure. It all gets us to the same place, right?
 
J

Joshua Landau

It depends. In some sense, probably an .exe is the very simplest thing you can provide a user: they download and move it to where they want, the click on it, it runs. It *is* good-to-go, isn't it? (btw, I know at leastone person I've read on a forum who just won't use any installer--he feelsit can put stuff on his computer where he doesn't have good easy control of it.)

Yeah, but why keep shipping the Python interpreter? If you choose the
installer route, you don't have to keep shipping it -- it's only
downloaded if you need it. If not, then you don't download it again.
Sometimes an installer might be preferable, especially if there are data or image files or tutorials or something that go with the .exe (that weren't, for some reason, bundled inside it).


But that's pretty much what the .exe that py2exe makes does anyway. It just kind of hides it all inside the .exe file.

The problem is that it hides it all inside the .exe file. And I'm not
suggesting putting Python inside the archive -- just the runtime
dependencies.
I don't think most informed users of, say, py2exe think that. I think they see it as "freezing" the application for single-file portability. The fact that people will refer to it as "compiling it to an exe" is unfortunate, yes.

Fair enough.
Again, for anyone selling software, just make as few steps as possible for the user. Using py2exe (which is easy to do) to freeze a lot of .py scripts into one easily deployed app passes that test. So does any simple method you mentioned, I'm sure. It all gets us to the same place, right?

But I still think my way is better. Perhaps I'm just too pragmatic
about these things. This was triggered by the OP's original request --
he sounds very much like he doesn't actually want this -- and it seems
to have stuck. I don't know if being pragmatic is a bad thing, though.

In the end, something like this is best solved with a bit of A/B
testing¹. Sit a couple of your audience down, give them the best
implementation of each strategy (starting from the website) for some
trivialised module and see what they think. If it turns out that being
pragmatic does have compromises, I'm not going to argue with the data.
I'd still be grumpy, though.

¹ This of course assumes you care enough to do so.
 
C

CM

Yeah, but why keep shipping the Python interpreter? If you choose the
installer route, you don't have to keep shipping it -- it's only
downloaded if you need it. If not, then you don't download it again.

I admit that not necessarily shipping the Python interpreter is much more efficient if your client base is expected to be a lot of people who already have Python and a lot of the common libraries (like wxPython). I have a fair number of Python 3rd party libraries already on my computer, so for me, it is preferable to just download the .py files the developer has made.

For some of the things I have thought about doing, though, the majority of the clients would never even have heard of Python other than Monty or the constrictor.


But I still think my way is better. Perhaps I'm just too pragmatic
about these things. This was triggered by the OP's original request --
he sounds very much like he doesn't actually want this -- and it seems
to have stuck. I don't know if being pragmatic is a bad thing, though.

I'll definitely think about the business angle of doing it the way you suggest. For example, for consulting work where the end user is a technical worker who just need a script to automate some processes, and you expect to be providing a number of scripts over time in this way, a good way to install and setup a Python + GUI toolkit + other likely necessary libraries wouldbe great. For more "product sales to the mass populous", I'm less sure.
In the end, something like this is best solved with a bit of A/B
testing¹. Sit a couple of your audience down, give them the best
implementation of each strategy (starting from the website) for some
trivialised module and see what they think. If it turns out that being
pragmatic does have compromises, I'm not going to argue with the data.
I'd still be grumpy, though.

Makes sense. I'm dubious about the full validity of A/B testing data without large data sets, but yes, at least one would be getting a feel for it. I can also see what other projects/businesses are doing.

Thanks for the input!
 

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,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top