码迷,mamicode.com
首页 > 编程语言 > 详细

python是如何执行的

时间:2017-09-04 09:48:54      阅读:158      评论:0      收藏:0      [点我收藏+]

标签:一个   解释   print   hello   python   des   保存   blog   代码   

首先写一个脚本
test.py
##
print(‘hello world‘)
##
右键属性->C:\Users\Administrator\Desktop
cmd->C:\Users\Administrator>python3 C:\Users\Administrator\Desktop\Python3.6\test.py
hello world
执行步骤
1 先启动Python解释器
2 Python解释器把文件内容从硬盘读入内存
3 读入内存后再解释执行
python的两种执行模式
1 交互的方式
优点:即时调试层序,调试方便
缺点:无法永久保存代码
2 文件的方式
优点:永久保存代码
缺点:不能即时调试代码

  

python是如何执行的

标签:一个   解释   print   hello   python   des   保存   blog   代码   

原文地址:http://www.cnblogs.com/zhaohongyu6688/p/7471970.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!