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