【发布时间】:2021-10-18 17:19:13
【问题描述】:
我正在使用pyenv-win,发现在我的Windows版本(20H2 19042.1165)中,where.exe支持带shebang的脚本:
C:\> where python
C:\Users\ded\.pyenv\pyenv-win\shims\python
C:\Users\ded\.pyenv\pyenv-win\shims\python.bat
第一个python文件是:
#!/bin/sh
pyenv exec $(basename "$0") "$@"
什么是魔法? where.exe 是否支持原生 shebang?哪个 Windows 版本包含此功能?
PS:在cmd 中运行python 将执行python.bat 而不是python。
【问题讨论】: