def patch_images(new_image_dir):
 pathto = partial(os.path.join, new_image_dir)
 if (new_image_dir != 'default'):
  if (not os.path.isdir(new_image_dir)):
   raise IOError('Unable to find the user supplied directory {}'.format(new_image_dir))
  new_images = ((varname, pathto(filename)) for (varname, filename) in _image_details if os.path.exists(pathto(filename)))
  globals().update(new_images)

def patch_images ( new_image_dir ) : pathto = partial ( os . path . join , new_image_dir ) if ( new_image_dir != 'default' ) : if ( not os . path . isdir ( new_image_dir ) ) : raise IOError ( 'Unable to find the user supplied directory {}' . format ( new_image_dir ) ) new_images = ( ( varname , pathto ( filename ) ) for ( varname , filename ) in _image_details if os . path . exists ( pathto ( filename ) ) ) globals ( ) . update ( new_images )
loads custom images from the user supplied directory .