Hardware Reference
In-Depth Information
Figure 2-4:
Python
prompts,
“Source Must Be
Saved”.
4. Type in a ilename (for this example, you can just call it hello.py ), and then click
Save as shown in Figure 2-5.
5. After IDLE has saved your code, you will see a message saying RESTART (Python does
this so you know you're always starting from the same consistent point), and then
your code will run in the Python Shell window, as shown in Figure 2-6. If you've made
a mistake, you'll see an error - correct it and then choose Run Module again.
When you save your code, IDLE adds .py to the end of the ilename. This is the ile extension
for Python source iles (just as Word adds .doc to documents).
 
Search WWH ::




Custom Search