def pickleReadDict(name):
 try:
  f = open((name + '.pickle'))
  val = pickle.load(f)
  f.close()
 except Exception as e:
  print(('Nothing read from', name, ':', str(e)))
  val = {}
 return val

def pickleReadDict ( name ) : try : f = open ( ( name + '.pickle' ) ) val = pickle . load ( f ) f . close ( ) except Exception as e : print ( ( 'Nothing read from' , name , ':' , str ( e ) ) ) val = { } return val
pickle-read a variable from a file .