[Python-Dev] Adding Python scripts to PATHEXT on Windows (original) (raw)

Paul Moore p.f.moore at gmail.com
Sun Jul 28 09:53:18 CEST 2013


On 28 July 2013 00:30, Steve Dower <Steve.Dower at microsoft.com> wrote:

Another issue to consider is that the modification to PATHEXT can't be undone when Python is uninstalled, unless each installation adds another ".PY" and each uninstall removes only one (so my PATHEXT would look like ...;.PY;.PY;.PY;.PY;.PY;.PY;.PY;.PY;.PY;.PY). I haven't checked, but this could seriously hurt performance of anything that uses PATHEXT to search PATH for anything ending in this extension. I hope that cmd.exe and PowerShell check for duplicate extensions, but I wouldn't be betting any money that they do.

I used the same mechanism in msi.py (which is MSI functionality, I believe) that is used to add Python's directory to PATH - this adds on install and removes on ininstall. So it should work just as well as that does.

Paul -------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20130728/0b59a3cc/attachment.html>



More information about the Python-Dev mailing list