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

The text editor approach

The command-line tool is useful for test coding logic, but it is neither practical nor elegant to write code using the interactive tool. It is easier to write a bunch of code at a time and test it. Let's repeat the same example using IDLE's text editor:

  1. Launch IDLE's text editor (in IDLE, FileNew File), enter the hello world line discussed in the previous section and save it as helloworld.py.
  2. Now, the code could be executed by either pressing the F5 key or clicking on Run Module from the drop-down menu Run, and you will get the output as shown in the following figure:
主站蜘蛛池模板: 兰溪市| 沈丘县| 古蔺县| 获嘉县| 奈曼旗| 新津县| 雷波县| 澄迈县| 奉化市| 仁化县| 临高县| 林周县| 泽库县| 德阳市| 华蓥市| 曲阜市| 巴东县| 襄樊市| 诏安县| 大连市| 呼图壁县| 安西县| 青神县| 九寨沟县| 神农架林区| 黄浦区| 专栏| 资中县| 张北县| 呈贡县| 宜春市| 英吉沙县| 湖南省| 温泉县| 灌南县| 广元市| 沙湾县| 湖口县| 南和县| 大田县| 邵阳县|