Path: csiph.com!fu-berlin.de!uni-berlin.de!not-for-mail From: eryksun Newsgroups: comp.lang.python Subject: Re: Launcher, and ftype Python.File Date: Wed, 18 Nov 2015 12:03:51 -0600 Lines: 22 Message-ID: References: <564C32F3.2070909@g.nevcal.com> Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Trace: news.uni-berlin.de FzKkorcFdEjnXwHMPzc7Og3z4RuG9XsLHOja5dG9n58w== Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.013 X-Spam-Evidence: '*H*': 0.97; '*S*': 0.00; 'win32': 0.03; 'executable': 0.07; 'wed,': 0.15; 'filenames.': 0.16; 'received:io': 0.16; 'received:psf.io': 0.16; 'wrote:': 0.16; 'shell': 0.18; '2015': 0.20; "aren't": 0.22; 'names.': 0.22; 'am,': 0.23; 'replacing': 0.23; 'header:In-Reply-To:1': 0.24; 'message-id:@mail.gmail.com': 0.27; 'specifically': 0.28; 'file': 0.34; 'handle': 0.34; 'received:google.com': 0.35; 'nov': 0.35; 'skip:p 30': 0.35; 'but': 0.36; 'received:209.85': 0.36; 'to:addr :python-list': 0.36; 'subject:: ': 0.37; 'received:209.85.213': 0.37; 'received:209': 0.38; 'christian': 0.38; 'to:addr:python.org': 0.40; 'programs': 0.62; 'programs,': 0.72 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=bCGO5HtXOHTLi6A/BGOowDGAWqy9yYF6bxI0lFLuo3A=; b=TXrFBcVqD85F6UEoGTeXDhnBtlpJ5v3ZXFFEGueQq9E3+vTPNHyKhUS80dcrQ1FCrx klurmq4a2qhFYWwBuU3Aczni+/eaIDCbQHVOl+V2+SzKNdhcuu3WpPPH6liF+PYxFdbV tkzrVuOtWYQrB4rAEk6IDHUfQv3ETLOSALalP4CEV1IOPWyde7qde1OjAHuwMor8yL5h z4yQxI6m3SlPdJvowwO5KRDj8VatGSUEfbPhRjbqZqiKKk7DGaDfKwo0hYwv3FTDznQa 0BQZNZnvlFkosCL9UT740J5hFL/sWRS5XIF9MGk2Z9pBl6SIqHElbli587lhR8g2ElXH 1BjA== X-Received: by 10.50.176.166 with SMTP id cj6mr8894637igc.74.1447869871551; Wed, 18 Nov 2015 10:04:31 -0800 (PST) In-Reply-To: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.20+ Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Xref: csiph.com comp.lang.python:98990 On Wed, Nov 18, 2015 at 8:45 AM, Christian Ullrich 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