docs: def getlines(fname):
      """
      Returns iterator of whitespace-stripped lines in file, omitting
      blank lines, lines beginning with '#', and line contents following
      the first '#' character.
      """
  
      with open(fname, 'rU') as f:
          for line in f:
              if line.strip() and not line.startswith('#'):
                  yield line.split('#', 1)[0].strip()