Feedback and corrections

Errors found since publication.

Third printing and earlier
(Look at the row of numbers on the first About the Cover page. If the last digit is a 3, that is 3rd printing):

  • Pg 43, Ch 3,Table 3.3. Under "Delete relative to the occurrence of x" at line "Same as above" it should be ^.*?(X) instead of ^.*(X)[Thanks to Daiki M]
  • Pg. 86, Ch 6. Shell scripting - (Not really an error, but something that could be explained better:) For Linux users: If your system gives very different output after the command set, but shows your environment with the command env, then you are using csh instead of bash, and should read p 464-465 in Appendix 1. (Type echo $SHELL to confirm, and read those pages if it says anything other than ...bash).
  • Pg. 90, Ch 6. Shell scripting - Permissions for the file dir.sh may already be executable when you save it (not generating the permissions error). This is because TextWrangler sometimes will set it for you upon saving. You just can't rely on that.
  • Pg. 91, Ch 6. Shell scripting - Permissions for the file dir.sh will be -rwxr--r-- after the chmod u+x command is executed, not -rwx-r-xr-x.
  • Pg. 191, Ch 10. Python. Files - In a commented-out line of code tthat is supposed to print ElementList for debugging, there is an extra curly quote mark. [Thanks to Tara M-S]
  • Pg. 262, Ch 15. MySQL - When you launch your first mysql session with the command mysql -u root Linux users should add -p to the end, if they added a password as recommended by the installer: mysql -u root -p [Thanks to Helena M-S and Sara H-C]
  • Pg. 269,270, Ch 15. MySQL - The example uses the date of July 3, 2003 for T596, but it should be July 19 to be consistent with the data file. [Thanks to David M]
  • Pg. 275, Ch 15. MySQL - The MySQLdb python module - Check the user-submitted tip here about installing this module.
  • Pg. 276-278, Ch 15. MySQL - On some systems, the mylatlon_4.py will not create records in the database, unless the line MyConnection.commit() is added as the second-to-last line of the file, just before the MyConnection.close() statement. [Thanks to Timothy F]
  • Pg. 282, Ch 15. MySQL - On Ubuntu, when using the LOAD DATA command, you might get this error:
    ERROR 1148 (42000): The used command is not allowed with this MySQL version
    If so, you will have to change settings by typing this at your bash prompt (not at the mysql prompt):
    mysql -u root --local-infile=1 [Thanks to Jessica O.]
  • Pg. 355, Ch 18 .Vector Graphics -In figure 18.5, It should say Inkscape instead of Linkscape.
  • Pg. 418, Ch 21. Installing agrep. The text doesn't actually specify the command to use to compile agrep (It is simply make.) In addition, the default Makefile won't work with OSX 10.8. You have to modify the first line by adding -Wno-return-type after where it says CFLAGS = -O . We have added a modified Makefile to the zip archive on our downloads page. If you do a fresh download, you can compile with make -f Makefile-OSX10.8. (You can ignore the warnings, but not the error that comes from an unmodified file.) [Thanks to Dave O'C.]

First printing:

  • Pg. 90, Ch 6. Shell scripting - Permissions for the file dir.sh will be -rwx-r--r-- after the chmod u+x command is executed, not -rwx-r-xr-x.
  • Pg. 97, Ch 6. Shell scripting - The first web address starting with http://www.crossref.org has an extraneous space between the ampersand and the word date. Both addresses need to be entered on one line without spaces.
  • Pg. 151, Ch 9. Python, Loops - The Shebang line has an extraneous space. [Thanks to Jessica C]
  • Pg. 185, Ch 10. Python. Files - It says that modules will be introduced in Chapter 13, but that should be Chapter 12. [Thanks to Sheena F]
  • Pg. 207, Ch 11. Python, Merging Files - The example code should include the line,FileNum = 0 at the top. [Thanks to Helena M-S]
  • Pg. 210, Ch 11. Python, Merging files - The two-line for loop that comes after the first else: statement (and prints the file names) should be commented out in the final version of the program. Alternatively you could replace the print line with a sys.stderr.write() statement to indicate the files that are being processed.
  • Pg. 287, Ch 15. MySQL - In the first blue box, Ventana should be Tiburon. [Thanks to David M]
  • Pg. 289, Ch 15. MySQL - In the second blue box, Ventana and Tiburon should not be in all caps. [Thanks to David M]
  • Pg. 355, Ch 18 .Vector Graphics -In figure 18.5, the left and right labels are transposed. Illustrator is on the left. [Thanks to Sara H-C]
  • pg. 460, App. 1 - The name of the disk image should be VBoxLinuxAdditions, not Lunux.
  • pg. 461, App. 1 - Ubuntu - In the instructions for setting up shared folders in the VirtualBox environment, initially the text says to create a folder called UbuntuShared (with a d at the end) but later on p. 462 it uses the name UbuntuShare, without a d. These names need to be the same.
  • pg. 512, App. 7. MySQL - The command for creating a new database is CREATE DATABASE databasename; (The word DATABASE is missing in the table.)

Sub-optimal grammar and non-critical typos

First printing:

  • Pg. 60, Ch 4. Shell - Should say if you try to type a command [Thanks to Louisa L]
  • Pg. 86, Ch 6. Shell Scripting - first sentence second paragraph, ...a command corresponding to what you have you entered at the command line [Thanks to Lauren D]
  • Pg. 106, Ch 7. Programming concepts - in the green box, first sentence second paragraph, languages exist in which programs typically are not typically compiled [Thanks to Erica L-N]
  • Pg. 177, Ch 10. Python, Files - at the bottom of the page, you should execute the program by typing latlon_1.py not lation.py [Thanks to Joseph G]
  • Pg. 193, Ch 10. Python, Files - In the text box, Göteberg should be Göteborg. [Thanks to David M]
  • Pg. 220, Ch 12. Python, Modules - in the table of functions, the random.random function technically returns a decimal value, not a fraction. [Thanks to Joseph G]
  • Pg. 237, Ch 13. Debugging - Table 13, under Indentation Error. Invisible characters are sometimes be introduced. [Thanks to Meghan C]
  • Pg. 237, Ch 13. Debugging - The entry for type error 'xx'.... should read Trying to retrieve values from a list ... causing the list to be interpreted... [Thanks to Erica L-N]
  • Pg. 261, Ch 15. MySQL - The text says that you will add :/usr/local/mysql/bin to the end of your existing path. The path, though, is currently wrapped in quote marks, so you have to place the new text inside the final close-quote. [Thanks to Helena M-S]
  • Pg. 261, Ch 15. MySQL - In the middle of the page, RMDBS should be RDBMS. [Thanks to David M]
  • Pg. 264, Ch 15. MySQL - Should read: It is much like navigating... [Thanks to Helena M-S]
  • Pg. 269, Ch 15. MySQL - The example uses the date of July 3, 2003 for T596, but it should be July 19 to be consistent with the data file. [Thanks to David M]
  • Pg. 271, Ch 15. MySQL - End of first paragraph: "text formatted exactly like as a command. [Thanks to David M]
  • Pg. 288, 289, 292, 295. MySQL - Formatting inconsistencies: SELECT vehicle FROM was not properly in all caps, Tiburon should not have been in all caps, and the QUERY OK line should not be in bold. [Thanks to Sara H-C and Helena M-S]
  • Pg. 300, Ch 16 - Near the middle of the page: Should be displaying instead of displying. [Thanks to Bob C]
  • Pg. 376, Ch 19. Graphics - In the section on exposure: you will be able to able to adjust your settings to account for the conditions. [Thanks to Helena M-S]
  • Pg. 505, App 6. Hex and Binary - Values of hexadecimal digits are can be determined... [Thanks to Helena M-S]

Suggested material for this site

Suggested topics for future book editions.

  • Web page development, and serving data over the web.
  • Reading and plotting data using R.
  • Version control.
  • Python version 3.x.

Please send feedback to