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

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

主站蜘蛛池模板: 嵩明县| 克山县| 旺苍县| 塔城市| 井陉县| 上高县| 铅山县| 苍山县| 漯河市| 新宁县| 涟源市| 陆河县| 沅陵县| 镇平县| 乳山市| 昌邑市| 天门市| 赣州市| 衡水市| 武穴市| 明水县| 茂名市| 吴江市| 囊谦县| 龙门县| 峨山| 祁连县| 颍上县| 拉萨市| 滕州市| 澄城县| 岢岚县| 合阳县| 贺兰县| 贡山| 汾阳市| 榆林市| 城市| 文成县| 利津县| 永城市|