bootstrapping on machines without Python
tartley at tartley.com
Sat Nov 14 17:51:36 CET 2009
On Nov 13, 1:57 pm, Tim Golden <m... at timgolden.me.uk> wrote:
> Jonathan Hartley wrote:
> > While examining py2exe et al of late, my thoughts keep returning to
> > the idea of writing, in C or similar, a compiled stand-alone
> > executable 'bootstrapper', which:
> > 1) downloads and install a Python interpreter if none exists
> > 2) runs the application's Python source code using this interpreter.
> Thinking aloud about what you're describing here... Assuming Windows,
> as your starting point is py2exe and I imagine that most Unix-like
> boxes already have Python on them.
> Step 1: The user downloads a tiny myapp.exe which is basically a zip of the
> myapp package / files plus an .exe header which will...
> Step 2a: ... download a minimised? (ie custom-built) Python interpreter
> and stdlib bundle which is just enough to run the app. Or...
> Step 2b: ... download and install the official python.org Windows
> installer for version x.y identified as the highest known to run
> this app if...
> Step 2bi) ... that version of the interpreter isn't already installed
> and registered on that machine (at least: for that user).
> My step 2a seems to be little better than a bundled py2exe, so I can
> only assume you mean Step 2b, especially given your comment below
> about ending up with an installation of Python where one wasn't
> before. This, though, seems fraught with accusations of backdoor
> installations etc.
> Have I misunderstood you? For the Record, I'm entirely in favour of moves
> to make Python use on Windows more seamless, attractive, consistent,
> etc. I was going to comment positively on your recent PyChooser widget
> and to plug a similar but unpublished one of my own. But I'm not sure
> if this particular proposal has enough wings to make it fly.
Hi Tim. Thanks for that.
Yes, you have understood pretty much perfectly. I was envisaging
something like 2b.
I'm very much enamored of creating cross-platform apps, but I'm
focused on deployment on Windows first, because this is where most
users are, and also where the problem seems to need the most work.
Your input is very much appreciated. It may be that you are right that
I haven't thought this through clearly enough.
Incidentally, I'd love to see your approach of dealing with the
problem that pychoose addresses - Since creating it, I'm gripped with
paranoia that it is failing to take account of lots of things which
will trip me up later (or worse- trip other people up too, if anyone
More information about the Python-list