官术网_书友最值得收藏!

Launching the Python interpreter via the Linux Terminal

It is also possible to use the Python interpreter via the Linux Terminal. Programmers mostly use this to test their code or refer to the Python documentation tool, pydoc. This approach is convenient if the readers plan to use a text editor other than IDLE:

  1. Launch the Raspberry Pi's command-line terminal from the desktop toolbar.

Launching the command-line terminal

  1. Type the command,python3 and press EnterThis should launch Python 3.x on the terminal.
  2. Now, try running the same piece of code discussed in the previous section:
       print("I am excited to learn Python with the Raspberry Pi Zero")

This would give the following screenshot as the result:

The result should be similar to that of the previous two sections

The Python interpreter in the Linux Terminal may be closed by typing exit() and pressing the return key

主站蜘蛛池模板: 固始县| 边坝县| 和龙市| 武义县| 通河县| 剑川县| 清苑县| 通山县| 宁城县| 贵阳市| 北川| 上虞市| 渝北区| 新野县| 罗源县| 连江县| 阳高县| 沙湾县| 滨海县| 正镶白旗| 青阳县| 侯马市| 来宾市| 牡丹江市| 安新县| 丰城市| 收藏| 莲花县| 永康市| 界首市| 通山县| 沙洋县| 海丰县| 米易县| 定边县| 青龙| 翁牛特旗| 朝阳区| 曲周县| 娄烦县| 镇安县|