GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Python/Article/python1/The_first_procedure.md at master · huanpython/Python

Expand file tree

/

The_first_procedure.md

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
18 lines (8 loc) · 1.16 KB
/

The_first_procedure.md

Copy path

File metadata and controls

18 lines (8 loc) · 1.16 KB
Raw
Copy raw file
Download raw file
Edit and raw actions

三、第一个 Python 程序

Python 的代码使用文本编辑器就可以写了,本草根使用 Sublime Text,第一个 Python 程序当然是 Hello Python 啦,把这句话打印出来。

注意 print 前面不要有任何空格,最后保存下来,可以看到,Python 保存后是一个以 .py 为后缀的文件。

HelloPython.png

最后就可以打开命令行窗口,把当前目录切换到 HelloPython.py 所在目录,就可以运行这个程序了,下面就是运行的结果。

运行第一个Python程序.png

当然,如果你是使用 Sublime Text ,并且在安装 Python 的时候配置好了环境变量,直接按 Ctrl + B 就可以运行了,运行结果如下:

Sublime运行Python.png

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.