def safe_file_dump(filename, payload):
 with safe_open(filename, u'wb') as f:
  f.write(payload)

def safe_file_dump ( filename , payload ) : with safe_open ( filename , u'wb' ) as f : f . write ( payload )
write a string to a file .