Hacking Secret Ciphers with Python

(Ann) #1

48 http://inventwithpython.com/hacking


Email questions to the author: [email protected]


Figure 4 - 3. The file editor window will look like this after you type in the code.

Saving Your Program


Once you’ve entered your source code, save it so that you won’t have to retype it each time we
start IDLE. To do so, from the menu at the top of the File Editor window, choose File ► Save
As. The Save As window should open. Enter hello.py in the File Name field, then click Save.
(See Figure 4-4.)


You should save your programs every once in a while as you type them. That way, if the
computer crashes or you accidentally exit from IDLE you won’t lose everything you’ve typed. As
a shortcut, you can press Ctrl-S on Windows and Linux or ⌘-S on OS X to save your file.


Figure 4- 4. Saving the program.
Free download pdf