<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<div>
<div style="font-size:11pt; font-family:Calibri,sans-serif">Windows fully supports *user* customization of file associations and there is no concept of ownership. The first program installed that sets up an association will normally get it, and as of Win8 the
next application will be blocked (and suggested to the user next time they open a file). Whether the other application stole the extension is irrelevant: a user is allowed to associate .py with something other than py.exe.<br>
<br>
I'm also working off experience with Windows here, I haven't done any special research. It may be that the APIs will assume .exe if no extension is specified, but I'd be surprised if backwards compatibility with with DOS, which I assume included PATHEXT, hadn't
been a consideration. The Run dialog uses ShellExecute, so you can test things there easily.<br>
<br>
Sent from my Windows Phone</div>
</div>
<div dir="ltr">
<hr>
<span style="font-size:11pt; font-family:Calibri,sans-serif; font-weight:bold">From:
</span><span style="font-size:11pt; font-family:Calibri,sans-serif"><a href="mailto:p.f.moore@gmail.com">Paul Moore</a></span><br>
<span style="font-size:11pt; font-family:Calibri,sans-serif; font-weight:bold">Sent:
</span><span style="font-size:11pt; font-family:Calibri,sans-serif">7/28/2013 1:00</span><br>
<span style="font-size:11pt; font-family:Calibri,sans-serif; font-weight:bold">To:
</span><span style="font-size:11pt; font-family:Calibri,sans-serif"><a href="mailto:Steve.Dower@microsoft.com">Steve Dower</a></span><br>
<span style="font-size:11pt; font-family:Calibri,sans-serif; font-weight:bold">Cc:
</span><span style="font-size:11pt; font-family:Calibri,sans-serif"><a href="mailto:martin@v.loewis.de">Martin v. Löwis</a>;
<a href="mailto:python-dev@python.org">Python Dev</a></span><br>
<span style="font-size:11pt; font-family:Calibri,sans-serif; font-weight:bold">Subject:
</span><span style="font-size:11pt; font-family:Calibri,sans-serif">Re: [Python-Dev] Adding Python scripts to PATHEXT on Windows</span><br>
<br>
</div>
<div>
<div dir="ltr">
<div class="gmail_extra">On 28 July 2013 00:30, Steve Dower <span dir="ltr"><<a href="mailto:Steve.Dower@microsoft.com" target="_blank">Steve.Dower@microsoft.com</a>></span> wrote:<br>
<div class="gmail_quote">
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex; border-left:1px #ccc solid; padding-left:1ex">
<div class="im">> And if you change the association after the fact, you're presumably just as capable<br>
> of changing PATHEXT.<br>
<br>
</div>
Not if the association is changed by another installer (presumably with the user's explicit permission). It would be very easy for people to go a long time without noticing this until some program does ShellExecute(...) on a name that happens to be a Python
script and Visual Studio pops open...</blockquote>
</div>
<br>
Mph. I'd argue that as Python "owns" the .py extension, any other application that changes the default action of .py scripts without both making that behaviour optional and making it off by default, is at least unfriendly and arguably even broken. But that's
just a matter of opinion...</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">As regards ShellExecute, I don't know how that is affected by PATHEXT. I looked quite hard and couldn't find complete "official" documentation on how PATHEXT is supposed to work, so I'm working a bit on experiment and best guesses here
:-( I'll go and check what the ShellExecute documentation says on the matter (but I'm surprised - I got the impression that PATHEXT was purely a console mechanism, so I don't quite understand why ShellExecute would use it).</div>
<div class="gmail_extra"><br>
</div>
<div class="gmail_extra">Paul</div>
</div>
</div>
</body>
</html>