1. 直接输入 $python 查看是否安装了PYTHON
[root@VV]# python
Python 2.6.6 (r266:84292, Jun 18 2012, 14:18:47)
[GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>>
OK 已经安装。 ctrl + d 退出。
2. 直接用 vim 编辑器写Python就好了。 习惯上已 .py 结尾 (当然不这样也可以)
执行Python 脚本:
python myTest.py
3. Python 脚本 开头 包含的环境~~~? shell 可以是 #!/bin/sh or #!/bin/bash
那么,Python 可以是 #!/usr/bin/env python
那么,你可以写一个 简单的 myTest.py , 然后运行试试啦~
#!/usr/bin/env python
print "hello world!"
4. linux 下写Python ,,那还可以像she