def load_images(img_names):
 if (img_names[0] == ''):
  return {}
 for image_name in img_names:
  img = open(image_name)
  loaded_imgs = {}
  img_list = ''
  img_line = ' '
  name = img.readline().replace('\n', '')
  name = name[1:]
  while True:
   img_line = img.readline()
   if (img_line == ''):
    break
   img_line.replace('\n', '')
   if (img_line[0] == ':'):
    loaded_imgs[name] = json.loads(img_list)
    name = img_line[1:]
    img_list = ''
   else:
    img_list += img_line
  loaded_imgs[name] = json.loads(img_list)
  return loaded_imgs

def load_images ( img_names ) : if ( img_names [ 0 ] == '' ) : return { } for image_name in img_names : img = open ( image_name ) loaded_imgs = { } img_list = '' img_line = ' ' name = img . readline ( ) . replace ( '\n' , '' ) name = name [ 1 : ] while True : img_line = img . readline ( ) if ( img_line == '' ) : break img_line . replace ( '\n' , '' ) if ( img_line [ 0 ] == ':' ) : loaded_imgs [ name ] = json . loads ( img_list ) name = img_line [ 1 : ] img_list = '' else : img_list += img_line loaded_imgs [ name ] = json . loads ( img_list ) return loaded_imgs
loads user images from given file(s) .