are creating the Birds base class object file that is needed for the Python script.
By the Way: Continue to Make It Easy
Instead of doing all this typing, you can download all three files—birds.py,
barnswallow.py, and sacliffswallow.py—from informit.com/register.
After downloading these object module files, you can skip over the steps to create
them!
- Make sure you have entered the statements into the nano text editor window, as shown in
Listing 15.4. Make any corrections needed. - Write out the information from the text editor to the file by pressing Ctrl+O. The file name
shows along with the prompt File name to write. Press Enter to write out the
contents to the birds.py object file. - Exit the nano text editor by pressing Ctrl+X.
- At the command-line prompt, type nano py3prog/barnswallow.py and press Enter.
The command puts you into the nano text editor and creates the file py3prog/barnswallow.py. - Type all the information from barnswallow.py in Listing 15.5 into the nano editor
window. You are creating the BarnSwallow subclass object file that is needed for the
Python script. - Make sure you have entered the statements into the nano text editor window, as shown in
Listing 15.5. Make any corrections needed. - Write out the information from the text editor to the file by pressing Ctrl+O. The file name
shows along with the prompt File name to write. Press Enter to write out the
contents to the barnswallow.py object file. - Exit the nano text editor by pressing Ctrl+X.
- Hang in there! You are getting close! At the command-line prompt, type nano
py3prog/sacliffswallow.py and press Enter. The command puts you into the nano
text editor and creates the file py3prog/sacliffswallow.py. - In the nano text editor window, type the information from lines 17–29 in the birds.py file
in Listing 15.3 (the comment lines). - Now type the following into the nano editor window:
Click here to view code image
from birds import Bird #import Bird base class
- Finish the SouthAfricaCliffSwallow subclass object file that needed for the Python
script by typing in the Python statements from lines 20 through 41 in Listing 15.3. - Make sure you have entered the statements into the nano text editor window as shown in
Listing 15.3, along with the additional import statement. Make any corrections needed. - Write out the information from the text editor to the file by pressing Ctrl+O. The file name
shows along with the prompt File name to write. Press Enter to write out the
contents to the sacliffswallow.py object file.