On 11 July 2013 00:18, CM <cmpyt...@gmail.com> wrote: > >> 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.)
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). > >> 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. 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. >> There are a lot of ways of making an installer <blah blah blah>. >> 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. 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. -- http://mail.python.org/mailman/listinfo/python-list