def write_index_dict(f, entries):
 entries_list = []
 for name in sorted(entries):
  entries_list.append(((name,) + tuple(entries[name])))
 write_index(f, entries_list)

def write_index_dict ( f , entries ) : entries_list = [ ] for name in sorted ( entries ) : entries_list . append ( ( ( name , ) + tuple ( entries [ name ] ) ) ) write_index ( f , entries_list )
write an index file based on the contents of a dictionary .