Greetings, cousins from Java land:

A new issue was recently raised on the IronPython group addressing the idea of including a copy of the Python Launcher for Windows in our binary distribution.

As a regular lurker of this group, I want to also bring up the issue here to get feedback from your point of view.  If I may suggest: this issue might be especially important for Jython -- years ago, my first attempt to use Jython for a real project was killed by the fact that I could not figure out a command line to actually make my script execute. Even today, the "jython" line in my py.ini file is the only one which word-wraps on my text editor. 

Here is a partial clip from our discussion...

vernondcole wrote Fri at 2:32 AM
I made a clone of the git version of PLW to look this idea over. It is a smallish C++ program and should not be too hard to patch to make alternate-implementation friendly. The problem today is that it is CPython specific and searches the Windows registry to determine which versions of Python are present. Alternate implementations are supported only using entries in the py.ini file and setting the #! line in your source code approprietly. (Which works great. I even have mine launching perl scripts, just to proove that it can.)

I propose adding two features to PLW.

1) extend the first command-line switch to also pick items from the py.ini file. I would like to type:
py -ipy
and have the command associated with "ipy" in my py.ini file executed.

2) PLW should have (in py.ini) a [default] section identifying which command in the [commands] section should be run in the absence of a command-line switch.

Alternate implementations should then install (or modify) py.ini to support their interpreter.

The extended PLW version ought to be backported to the CPython distribution, so that any implementation of Python will work. I don't think that the CPython group would object.

Note 1: I have not compared to make sure the stand-alone PLW is identical with the Python 3.3 version.
Note 2: We need to make sure that PLW will work correctly even if no CPython versions are present.
Note 3: I fear that I have just volunteered to write the patch. Is someone else out there williing? It's been a very long time since I wrote commercial quality C code.

jdhardy wrote Fri at 5:33 AM

Sounds good. I remember from the original PLW discussion they want it to work for other implementations but weren't sure what would be needed. It sounds like you're making that list. :)

It's probably worth opening bugs on the Python tracker describing what needs to change, since it's not IronPython specific. If you don't feel comfortable writing the code perhaps someone over there can, or at least review the code for you.

Comments from the Jython side are hereby requested...