有同学问,能不能像. exe 文件那样直接运行
.py
#!/usr/bin/env python3print('hello, world')
然后,通过命令给
hello.py
$ chmod a+x hello.py
就可以直接运行
来源: