def pload(fname, default=None):
 try:
  f = file(fname, 'r')
  d = pickle.load(f)
 except IOError:
  d = default
 else:
  f.close()
 return d

def pload ( fname , default = None ) : try : f = file ( fname , 'r' ) d = pickle . load ( f ) except IOError : d = default else : f . close ( ) return d
load a pickled object from a file .