def is_text_file(filename):
 try:
  return (not is_binary(filename))
 except (OSError, IOError):
  return False

def is_text_file ( filename ) : try : return ( not is_binary ( filename ) ) except ( OSError , IOError ) : return False
test if the given path is a text-like file .