Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #98958 > unrolled thread
| Started by | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| First post | 2015-11-18 05:52 -0500 |
| Last post | 2015-11-18 12:03 -0600 |
| Articles | 3 — 3 participants |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Launcher, and ftype Python.File Terry Reedy <tjreedy@udel.edu> - 2015-11-18 05:52 -0500
Re: Launcher, and ftype Python.File Christian Ullrich <chris@chrullrich.net> - 2015-11-18 15:45 +0100
Re: Launcher, and ftype Python.File eryksun <eryksun@gmail.com> - 2015-11-18 12:03 -0600
| From | Terry Reedy <tjreedy@udel.edu> |
|---|---|
| Date | 2015-11-18 05:52 -0500 |
| Subject | Re: Launcher, and ftype Python.File |
| Message-ID | <mailman.409.1447844007.16136.python-list@python.org> |
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
[toc] | [next] | [standalone]
| From | Christian Ullrich <chris@chrullrich.net> |
|---|---|
| Date | 2015-11-18 15:45 +0100 |
| Message-ID | <db3h92Fpu11U1@mid.individual.net> |
| In reply to | #98958 |
* Terry Reedy wrote: > On 11/18/2015 3:12 AM, Glenn Linderman wrote: >> 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. Apparently %L is always the long file name, and %1 is the short name unless the shell can prove that the executable can handle long names. >> Google doesn't support searching for "%L" very well. https://www.google.com/search?q=ftype+%22%25L%22#q=ftype+%22%25L%22+-mks -- Christian
[toc] | [prev] | [next] | [standalone]
| From | eryksun <eryksun@gmail.com> |
|---|---|
| Date | 2015-11-18 12:03 -0600 |
| Message-ID | <mailman.420.1447869874.16136.python-list@python.org> |
| In reply to | #98976 |
On Wed, Nov 18, 2015 at 8:45 AM, Christian Ullrich <chris@chrullrich.net> wrote:
> Apparently %L is always the long file name, and %1 is the short name unless
> the shell can prove that the executable can handle long names.
Specifically old Win16 programs (identified by the file header) aren't
aware of long filenames. In the case of these old programs, the shell
calls GetShortPathName when replacing %0 or %1, but not when replacing
%L.
For Win32 programs %0, %1, and %L are all the same:
C:\Temp>ftype Python.File
Python.File="C:\Windows\py.exe" "%0" "%1" "%L" %*
C:\Temp>longfilename.py
sys.argv:
C:\Temp\longfilename.py
C:\Temp\longfilename.py
C:\Temp\longfilename.py
Short Pathname:
C:\Temp\LONGFI~1.PY
[toc] | [prev] | [standalone]
Back to top | Article view | comp.lang.python
csiph-web