python的第一个脚本

使用python语言制作脚本

1、前期准备,查看本地python 是否安装 (若未安装请查看曾经博客内容)

$>python -V (备注:注意"V"为大写,小写v进入python的命令界面)

2、制作文件helloWord.py  内容如下:

$>touch helloWorld   (然后vi 进入编辑页面)

#!/usr/bin/python

print 'hello world'

3、修改文件权限添加可执行权限:

$>chmod +x helloWorld.py

4、运行脚本

第一个打印脚本制作成功

猜你喜欢

转载自blog.csdn.net/weixin_39435629/article/details/85103645