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

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:
主站蜘蛛池模板: 天峨县| 乐山市| 修武县| 会昌县| 韩城市| 龙口市| 大方县| 当涂县| 白银市| 姚安县| 新昌县| 伽师县| 临安市| 高要市| 裕民县| 九台市| 十堰市| 宾川县| 大化| 绍兴市| 陆河县| 鲜城| 盘山县| 如东县| 东平县| 永兴县| 冷水江市| 广宁县| 射阳县| 涿鹿县| 桑日县| 云浮市| 花垣县| 瓦房店市| 广平县| 罗定市| 昌都县| 徐州市| 淳化县| 天门市| 盘锦市|