【Linux】Linux下调用Python程序脚本
2016-06-07 10:55
603 查看
#-------linux下查看Python版本
#-------pyhton测试程序 test.py
我的保存路径:/home/yfy/test.py
#------python脚本运行
------第一种方式:
chmod +x test.py ------给脚本增加执行权限
------第二种方式:
yfy@yfy-H81M-DS2:~$ python --version Python 2.7.6
#-------pyhton测试程序 test.py
#! /usr/bin/python for i in range(0,5) : print i
我的保存路径:/home/yfy/test.py
#------python脚本运行
------第一种方式:
yfy@yfy-H81M-DS2:~$ chmod +x test.py yfy@yfy-H81M-DS2:~$ ./test.py 0 1 2 3 4
chmod +x test.py ------给脚本增加执行权限
------第二种方式:
yfy@yfy-H81M-DS2:~$ python test.py 0 1 2 3 4
相关文章推荐
- Linux socket 初步
- Linux Kernel 4.0 RC5 发布!
- Python动态类型的学习---引用的理解
- Python3写爬虫(四)多线程实现数据爬取
- 垃圾邮件过滤器 python简单实现
- linux lsof详解
- linux 文件权限
- Linux 执行数学运算
- 下载并遍历 names.txt 文件,输出长度最长的回文人名。
- 10 篇对初学者和专家都有用的 Linux 命令教程
- Linux 与 Windows 对UNICODE 的处理方式
- Ubuntu12.04下QQ完美走起啊!走起啊!有木有啊!
- 解決Linux下Android开发真机调试设备不被识别问题
- 运维入门
- 运维提升
- Linux 自检和 SystemTap