Python 3种启动方法: 交互式、python脚本、图形界面运行python

一、交互式的启动解释器

      每次输入一行Python代码来执行。

1.1 Linux

      1. 添加python路径到环境变量PATH。

      2. 启动python:python。

      3. 执行命令:print("hello world")。


1.2 Windows

      1. cmd启动命令行,切换到python安装目录:C:\Python33。
      2. 启动python:python。
      3. 执行命令:print("hello world")。


二、Python脚本

2.1 Linux

      1. 写python脚本:test001.py


      2.执行python脚本:python test001.py


2.2 Windows

      1. 写python脚本:test001.py

      2.执行python脚本:双击执行  或 右键 -> Edit with IDLE -> Run -> Run Module【F5】


三、集成开发环境中的图形用户界面

3.1 Linux


3.2 Windows





猜你喜欢

转载自blog.csdn.net/kanguolaikanguolaik/article/details/15340615