Page 110 - Computer - 6
P. 110
To save a script:
1. On the Menu bar, click 1
the File menu.
The File menu opens.
2. Select the Save option.
The Save As dialog box 2
opens.
3. Type a name for the 3
script in the File name 4
text box.
4. Click the Save button. Time Saver
Python saves the script and displays the Save a script: Ctrl + S
name on the Title bar of the Editor window.
Knowledge Discovery Subject Enrichment
• Every Python script is saved with the extension .py. This also lets the Python IDLE identify a file as a valid
Python script.
• To save a script with another name, select the Save As… option from the File menu.
To open a saved script: 1
1. On the Menu bar, click
the File menu. 2
The File menu opens.
2. Select the Open option.
The Open dialog box 3
opens.
3. Select the desired Python
script and click the Open
button. Time Saver
The selected script is displayed in the Editor window.
To execute a script: Open a saved script: Ctrl + O
1. On the Menu bar, click the Run menu.
The File menu opens.
1
2
2. Select the Run Module option. Time Saver
The script is executed, and its output is displayed in the IDLE window. Run a script: F5
108