[Python-Dev] PEP 441 - Improving Python ZIP Application Support (original) (raw)
Steve Dower Steve.Dower at microsoft.com
Mon Feb 16 17:34:12 CET 2015
- Previous message: [Python-Dev] PEP 441 - Improving Python ZIP Application Support
- Next message: [Python-Dev] PEP 441 - Improving Python ZIP Application Support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Paul Moore wrote:
On 15 February 2015 at 18:25, Petr Viktorin <encukou at 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
- Previous message: [Python-Dev] PEP 441 - Improving Python ZIP Application Support
- Next message: [Python-Dev] PEP 441 - Improving Python ZIP Application Support
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]