python脚本运行的方法:
方法一:脚本式编程
编写脚本文件,命名成一个.py文件(例 hello.py):
print ("hello, python!");
打开命令行窗口,然后切换到py文件的路径下面,然后输入“python py文件名称”,例
python ./hello.py
输出:
hello,python
方法二:利用python自带的idel
python 自带了一款 ide,叫做 idle。
在idle中输入脚本代码,回车即可。
以上就是python怎么运行脚本?的详细内容。