Linux运行python程序

reference:https://www.cnblogs.com/liunaixu/p/12804205.html

1、python-->两次Tab,出现如下图所示:显示python版本如下

 2、使用gedit命令打开文本文档,输入print("hello world"),保存成p.py文件

 3、运行python p.py,结果如下:

 4、ls -l 查看目录:r只读w可写

 5、执行./p.py文件-->结果是权限不够

 6、cat ./p.py

[lnx@localhost 桌面]$ cat ./p.py
#!/usr/bin/env python
print("hello world")
原文地址:https://www.cnblogs.com/marxtsui/p/14417064.html