the general development using Python

CM cmpython at gmail.com
Thu Jul 11 01:18:58 CEST 2013


> 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 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 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 or image 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 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.

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?







More information about the Python-list mailing list