def write_open_mode(filename):
 if is_binary(filename):
  return 'wb'
 return 'w'

def write_open_mode ( filename ) : if is_binary ( filename ) : return 'wb' return 'w'
return the write mode that should used to open file .