Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.035 X-Spam-Evidence: '*H*': 0.93; '*S*': 0.00; 'subject:Windows': 0.02; 'puts': 0.07; 'subject:PEP': 0.07; 'subject:support': 0.07; 'subject:using': 0.09; 'python': 0.11; '.py': 0.16; 'governed': 0.16; 'subject: \n ': 0.16; 'subject:API': 0.16; 'variable.': 0.16; 'wrote:': 0.18; 'have:': 0.19; 'seems': 0.21; 'shell': 0.22; 'header:User-Agent:1': 0.23; 'subject: .': 0.24; 'environment': 0.24; 'order.': 0.26; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'chris': 0.29; 'member.': 0.30; 'probably': 0.32; 'subject:from': 0.34; 'case,': 0.35; 'but': 0.35; 'mine': 0.38; 'to:addr:python- list': 0.38; 'skip:. 10': 0.39; 'structure': 0.39; 'to:addr:python.org': 0.39; 'days': 0.60; 'simply': 0.61; 'back': 0.62; 'received:46': 0.66; 'received:gq1.yahoo.com': 0.68; 'received:mail.gq1.yahoo.com': 0.68; 'revealed': 0.68; 'received:98.136': 0.69; 'associations': 0.84; 'explorer': 0.84; 'from:addr:yahoo.no': 0.84; 'message-id:@yahoo.no': 0.84; 'received:bullet.mail.gq1.yahoo.com': 0.84; 'subject:skip:F 10': 0.84 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.no; s=s2048; t=1430982931; bh=hHwREX9ZofqI2KPIcFo0GbJWGuW5SzCn5Jp95UhxWjU=; h=Date:From:To:Subject:References:In-Reply-To:From:Subject; b=SU/UXT0y4n9orla2YOV0dJZP5/AQRAX7Q/bvEOB9nXB2D/0rppvOOGKF1T/qGta/dImOax89oJDFUlfLy/mvoCyjKh9VtlUD5z/vzi11eOIC/GtGFH8KX/FSInH7osJHCNZ5EBXgRRxpCyFuHOBD8K8C/dGixybzA+gzxsuf9AX7ZzTti3mpybutTqS5w9ByvGLM5OKoEUt0Hk9GnzlDuxhHbCsW8b8q9UZuq8ZVyJG8NBWyGgVDDSUtCjrk5/SA4SDofOazUwNC9GcMkf6djEpH/y4mggaqHoZc9+7VFFJVrhuUujPsMEwNgyEsoHCGWYU6B1e6bqnA6fMNhlV6sg== X-Yahoo-Newman-Id: 527470.96424.bm@smtp150.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: Wu_AJq0VM1lrXUb_PU3GRgz6KksBOPaS9OoVZIVX8uy1ToM DkMXxRblQgmJ9ozkqsEjnW32o7DkZ0Fpt4oQEoSeVDIgEuo4WXb0eLg6D5z0 WRxZVxeBI6lbhhx1YEyDcg1LEaGLIU76_1IPRgvxyn2nXH6nkimKIXJqgvT0 bF1nOOTmFZ5TfRUVpDVW03jLkn8bql7BbMLEBZINMSXlG1VupRB0PWn2jeW5 kuclVjzwuV2wZqjmJcYjq9EOD98NMKq3vfA1sr7JMRT5pZIcwuFWhrsXWLE2 gwLYsavqEtwksfuQVU4gbLjDOMa1sydm.RafDPgcaaZJG9SsT3DtrdLyAz9d z9aCK14cf._S0OFDi9mlWY8UkE1soKysfL5iKmCi_9MEFB39NJWztRWmT1fl O1V2UhhOoGd12g3KBZbm_nfdL80HoA.5d9iPzdceGLBQ66RcFh6A9V._3kAc 0xcxzoyAHH6Z.5Ir.Xp_n.qfqKQWk8Ig45fAK0C7VCsRFQEj5uhGTSTFx30. udqMqVOvM07rgXy8ThDXdq13U X-Yahoo-SMTP: 8zhYLGyswBB3AGU8c4pvFIFOfA-- Date: Thu, 07 May 2015 09:15:36 +0200 From: Gisle Vanem User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64; rv:36.0) Gecko/20100101 Firefox/36.0 SeaMonkey/2.33.1 MIME-Version: 1.0 To: python-list@python.org Subject: Re: PEP idea: On Windows, subprocess should implicitly support .bat and .cmd scripts by using FindExecutable from win32 API References: <554AB8A5.708@davea.name> <554adcf8$0$11103$c3e8da3@news.astraweb.com> In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit 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: , Newsgroups: comp.lang.python Message-ID: Lines: 25 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1430983119 news.xs4all.nl 2894 [2001:888:2000:d::a6]:55900 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:90089 Chris Angelico wrote: > There's a specific search order. Back in the days of DOS, it was > simply "com, then exe, then bat", but on modern Windowses, I think > it's governed by an environment variable. You probably mean '%PATHEXT'. Mine is: .COM;.EXE;.BAT;.BTM;.CMD;.JS;.JSE;.WSF;.WSH;.MSC;.tcl;.py;.pyw;.pl;.htm;.html In my favourite shell 4NT, I simply can have: set .py=python Instead of the Explorer associations that the Python-installer puts in my registry. Revealed from my shell: c:\> assoc .py .py=py_auto_file c:\> ftype py_auto_file py_auto_file="F:\ProgramFiler\Python27\python.exe" "%1" In ShellExecuteEx(), what program gets launched for "py_auto_file" in this case, seems to be determined by the 'SHELLEXECUTEINFO:lpClass' member. I fail to see that Python uses this structure anywhere. -- --gv