def load_processed_files(path):
 processed_files = {}
 with open(path) as input_file:
  for line in input_file.readlines():
   line = line.strip()
   if (not line):
    continue
   if (' ' not in line):
    raise TypeError(('Malformed line: %s' % line))
   (path, timestamp) = line.rsplit(' ', 1)
   if (not os.path.isabs(path)):
    raise TypeError(("'%s' is not an absolute path" % path))
   elif (not timestamp.isdigit()):
    raise TypeError(("'%s' is not an integer timestamp" % timestamp))
   processed_files[path] = int(timestamp)
 return processed_files

def load_processed_files ( path ) : processed_files = { } with open ( path ) as input_file : for line in input_file . readlines ( ) : line = line . strip ( ) if ( not line ) : continue if ( ' ' not in line ) : raise TypeError ( ( 'Malformed line: %s' % line ) ) ( path , timestamp ) = line . rsplit ( ' ' , 1 ) if ( not os . path . isabs ( path ) ) : raise TypeError ( ( "'%s' is not an absolute path" % path ) ) elif ( not timestamp . isdigit ( ) ) : raise TypeError ( ( "'%s' is not an integer timestamp" % timestamp ) ) processed_files [ path ] = int ( timestamp ) return processed_files
loads a dictionary of path => last modified timestamp mappings .