Outline for November 28, 2012

Reading: § 15
Due Date Changed! Assignment Due: Friday, November 30, 2012 at 11:59 PM

  1. More on files
  2. Examples
    1. Put lines in a file in random order [randlines.py]
    2. Read in a list of words from a file, then search it as requested; similar to linear search program done last week [search-1.py]
    3. Now see how many words you checked total [search-1c.py]
  3. Reading a URL [geturl.py]
    1. Opening a URL
    2. Reading the page as a string (utf-8, us-ascii, iso-8859-1, etc.)
    3. Note what happens if you leave off the decode() (note the b’') [geturl2.py]

A PDF version is available here.
ECS 10, Basic Concepts of Computing
Fall Quarter 2012