Shebang/choose what version of Python a script is going to run

前端 未结 2 672
盖世英雄少女心
盖世英雄少女心 2021-01-25 14:31

As a lot of people I have both the 2.7 and 3.5 version of python. Some code is backwards-compatible, some are not. This is because of the lack of modules that exist for 2.7 but

2条回答
  •  时光说笑
    2021-01-25 14:38

    As mentioned in J. F. Sebastian's comment on this answer, the Python Launcher for Windows can select the Python version to run from a shebang line. According to the docs it's installed by default with Python 3.3 and later.

提交回复
热议问题