[Python-Dev] Install-on-first-use vs. optional extensions

Guido van Rossum gvanrossum at gmail.com
Wed Sep 8 06:53:52 CEST 2004


On Wed, 08 Sep 2004 06:41:28 +0200, Martin v. Löwis <martin at v.loewis.de> wrote:
> I recently looked into properly implementing the "Register Extensions"
> feature in the installer; in 2.4a3, not selecting that doesn't really
> work. The problem is that MSI only supports installing either both
> the "extension server" (the .exe) and the extension, or neither. So
> you can chose not to install word.exe, and it won't install the .doc
> extension; if you install word.exe, it will associate .doc with it.
> 
> For Python, this leaves us with three options:
> 1. Don't make registration of extensions optional; always associate
>     .py, .pyc, .pyw, .pyo.
> 2. Don't support installation-on-demand for extensions. This means
>     to not use the MSI extension machinery at all, but to directly
>     write the registry keys that build the extension. Installing
>     these keys can then be made optional.
> 3. Provide another binary that is the "extension server", and
>     install that independently of python.exe, and pythonw.exe.
>     In CVS, I have implemented this approach to see whether it
>     works (it does), and called this binary "launcher.exe". It
>     is a Windows app which supports a -console argument which also
>     makes it a console app. This is the the binary that gets
>     associated with all four extensions, for the "open" verb.
> 
> Currently, I'm in favour of using option 3, but I'd like to hear
> whether people would prefer something else instead.
> 
> Regards,
> Martin

I frequently use the extension feature in a console context; when I am
in a directory full of .py files, I can run any one of them by simply
typing its name (and possibly command line arguments). The script will
then interact through the existing console window. WIll this work?
>From your description I fear that this would start the script without
console I/O possibility or in a separate window, both of which would
make this a no-no. If you can confirm that this works as expected, I
think the separate driver is fine, since pretty much by definition you
can't pass any command line arguments to Python (although I would hope
that the environment variables would still work).


-- 
--Guido van Rossum (home page: http://www.python.org/~guido/)
Ask me about gmail.


More information about the Python-Dev mailing list