Outline for January 28

Reading: Linux book,§1–4; text, §12
Due: Homework 2, due on February 1 at 11:55pm


  1. Linux
    1. File system: absolute, relative path (file) names; ls
    2. The shell, running commands
    3. Search path, other environment variables
    4. Shell wildcards
  2. Handling exceptions
    1. Using global variables as error flags [except6a.py]
    2. raise [except7.py]
  3. Common exceptions
    1. ZeroDivisionError — attempt to divide (or take the remainder of) something by 0
    2. TypeError — operation or function applied to operand of wrong type
    3. SyntaxError — Python parser encountered a malformed statement
    4. NameError — local or global name is not found
    5. ValueError — built-in function or operation applied to operator with illegal value
    6. EOFError — input function encounters an end of file
    7. Keyboard Interrupt — user hit the interrupt key (usually control-C)
\
UC Davis seal
Matt Bishop
Office: 2209 Watershed Science
Phone: +1 (530) 752-8060
Email: [email protected]
You can also obtain a PDF version of this.
Version of January 25, 2019 at 9:44PM