def pickle_load(filename):
 fh = open(filename, 'r')
 try:
  data = pickle.load(fh)
 finally:
  fh.close()
 return data

def pickle_load ( filename ) : fh = open ( filename , 'r' ) try : data = pickle . load ( fh ) finally : fh . close ( ) return data
py2py3 compatible pickle load arguments: filepath : file containing pickle data stream to load returns: unpickled object .