Paul Moore wrote: > On 15 February 2015 at 18:25, Petr Viktorin <encu...@gmail.com> wrote: >> On POSIXy systems the "python3" symlink is created in all venvs. I >> thought (perhaps naïvely) that Windows doesn't do shebangs natively, >> so there's some Python-specific mechanism around them, which should >> handle "python3". > > Windows doesn't have "python2" or "python3" commands, just "python". > To choose which version you use, set PATH or use an explicit path to the > executable. > > The launcher offers shebang handling for scripts, and special-cases the > following values for Unix compatibility: > > #!/usr/bin/env python > #!/usr/bin/python > #!/usr/local/bin/python > > They default to the "default Python" which is normally the latest Python 2 > version available, but which can be configured by the user. > They also support adding an explicit version (python2, python3, python2.7, > python3.4, ...) > > As far as I know, this is *identical* behaviour to Unix - even to the > incredibly > annoying (to me) choice of Python 2 as a default. So I reconfigure the default > in my personal settings to Python 3. Unix users can do this too (although it > may > involve a symlink in a ~/bin directory rather than an ini file change).
We could also add special-cases for "#!/usr/...python3" in the launcher on Windows. Cheers, Steve _______________________________________________ Python-Dev mailing list Python-Dev@python.org https://mail.python.org/mailman/listinfo/python-dev Unsubscribe: https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com