def pickleDumpDict(name, d):
 try:
  f = open((name + '.pickle'), 'w')
  pickle.dump(d, f)
  f.close()
  return True
 except Exception as e:
  print(('Error writing into', name, ':', str(e)))
  return False

def pickleDumpDict ( name , d ) : try : f = open ( ( name + '.pickle' ) , 'w' ) pickle . dump ( d , f ) f . close ( ) return True except Exception as e : print ( ( 'Error writing into' , name , ':' , str ( e ) ) ) return False
pickle-dump a variable into a file .