phix

Linux下创建并执行Python脚本

 

vim first.py

 #! /usr/bin/env python  

  

list = [ 1,2,3,4,5,6,7,9,10,11]  

tuple = (1,2,3,4,5,6,7,9,10)  

print list  

print tupl


执行py脚本

 

python first.py   


或者

 

 


 

chmod u+x first.py  

./first.py  

 

 

 环境配置说明:

#!/usr/bin/python  

 

在centos下python的路径

 #!/usr/bin/env python   

可适配置在所有linux版本下的python路径

 

 

转载自

http://blog.csdn.net/kwu_ganymede/article/details/50989712

分类:

技术点:

相关文章:

  • 2021-12-26
  • 2021-12-24
  • 2021-11-24
  • 2021-07-03
  • 2021-11-01
  • 2021-12-06
  • 2021-04-30
  • 2021-12-24
猜你喜欢
  • 2021-10-14
  • 2021-12-06
  • 2021-12-06
  • 2021-12-24
  • 2021-04-18
  • 2021-12-12
  • 2021-10-13
相关资源
相似解决方案