Launcher, and ftype Python.File

Terry Reedy tjreedy at udel.edu
Wed Nov 18 05:52:57 EST 2015


On 11/18/2015 3:12 AM, Glenn Linderman wrote:
> Setting up a new machine with Windows 10, I installed Python 3.5.0 and
> the Launcher. Invoking python files from batch files as
>
> foo.py -a -bunch -of -parameters
>
> Didn't seem to do _anything_ so I checked:
>
> d:\>assoc .py
> .py=Python.File
>
> d:\>ftype Python.File
> Python.File="C:\Windows\py.exe" "%L" %*

Verified on my Win 10

> I'm surprised by the "%L" where usually programs have "%1". Is this a
> new Windows feature I don't know about yet, or is it a bug in the
> installer for the Launcher?

It puzzles me tool. However, it works.

> ftype /?  does not enlighten me that there is a new %L feature available.

I accidentally entered just 'ftype' and since WMP11 listings are at the 
end, noticed that they also use %L.  I also see that WMP11 listings are 
the only ones (other than Python.*) using %L.  Not even other MS 
listings, as for IE, do.

After entering 'ftype /?' as intended, I see that %0 and %1 are synonyms 
for the first word == the file being launched.  I also did not find 
mention of %L.  My guess is 'L' is a new term for 'Launched file'. 
Steve Dower, who wrote the 3.5 intaller, would know about it as a MS 
employer.

Steve, can you verify the above, and maybe tell whoever to update the 
ftype help?  Is there any difference (other than our puzzlement) between 
using %1 and %L?

> Turns out I had an empty file named foo.py and that is why it didn't do
> anything, but now I'm just really puzzled about what "%L" means...
> Google doesn't support searching for "%L" very well.


-- 
Terry Jan Reedy




More information about the Python-list mailing list