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

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

主站蜘蛛池模板: 芜湖县| 师宗县| 米林县| 巫溪县| 彭泽县| 林芝县| 正镶白旗| 万山特区| 双城市| 松潘县| 兴城市| 常德市| 隆德县| 新野县| 新疆| 涟源市| 江西省| 湛江市| 资源县| 平塘县| 闸北区| 宁化县| 当涂县| 抚顺市| 湛江市| 上思县| 黄浦区| 凉山| 旬阳县| 申扎县| 孝昌县| 平原县| 冀州市| 新营市| 江川县| 泸西县| 恩平市| 太谷县| 成安县| 屯昌县| 桦甸市|