如何跟踪python脚本在linux上怎么运行

如题所述

[root@qiansw tmp]# cat test.py #这是一个python示例程序
#!/usr/bin/python
for i in range(0,5):
print i

[root@qiansw tmp]# ll
total 48
-rw-r--r-- 1 root root 48 Oct 30 11:04 test.py
[root@qiansw tmp]# chmod +x test.py #为脚本增加执行权限
[root@qiansw tmp]# ./test.py #这是第一种方法
[root@qiansw tmp]# python test.py #这是第二种方法,不用增加执行权限
温馨提示:内容为网友见解,仅供参考
无其他回答
相似回答