From: Mark McMahon <mark.mcmahon@eu...> - 2005-03-22 18:46:32
Eric Ries> Eric Ries wrote:
> I'm a long time py2exe user and fan. This evening, I was pondering
> it would be possible and/or hard to modify py2exe to support automatic
> updates to the pyhton code for my application. I would love any
> the idea before I start hacking away.
> Here's what I was imagining:
> 1) py2exe supports an optional "update-url"
> 2) when the py2exe script starts up, before it loads library.zip (or
> equivalent), it first loads updater.zip, which contains the update
> 3) the updater.zip file checks the update-url (via urllib2) to see if
> library.zip is still the latest version, if so, returns
> 4) if library.zip is no up-to-date, updater downloads the new one,
> library.zip, then returns
> 5) the py2exe script continues as normal
> This approach is not optimal (it doesn't handle binary modules, for
> example), but it would certainly handle a lot of the cases that I've
> work around so far. Usually I have to write a seperate
> app that does the update checking. It'd be so much more elegant to
> all in one exe.
> I'm wondering if anything like this has been attempted or if there is
> of attempting it without modifying start.c - any suggestions?
This sounds like a cool idea. Personally I haven't used Py2exe very much
but the very first (and main) script that I have py2exe'd had actually
modified the library and path - so that the files that would be updated
the most would not be in the zip at all. That way my py2exe'd
could be more or less the same my development environment - and allows
others to easily hack the code if they need. (and it would work!!)
P.S. Py2exe helped to make this too available internally in my company
it would not have been accepted if python had to be installed. So thanks
Tomas for 2 excellent tools (and I am looking forward to comtypes!!)