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

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:
主站蜘蛛池模板: 石门县| 偏关县| 鸡泽县| 乌海市| 香河县| 德格县| 壤塘县| 柳江县| 建阳市| 芮城县| 和静县| 遂川县| 读书| 平塘县| 浮梁县| 房产| 克山县| 蒙山县| 龙泉市| 罗平县| 德庆县| 垣曲县| 漳平市| 天门市| 灵石县| 慈利县| 盈江县| 灵丘县| 聊城市| 西充县| 贵州省| 革吉县| 望江县| 东乡县| 博爱县| 吕梁市| 通州区| 麻栗坡县| 桃江县| 句容市| 横峰县|