is_binary_file
- sherpa.utils.is_binary_file(filename: str) bool[source] [edit on github]
Estimate if a file is a binary file.
- Parameters:
- filename
str The name of the file.
- filename
- Returns:
- flagbool
Returns True if a non-printable character is found in the first 1024 bytes of the file.
Notes
For this function, “binary” means the file contains a non-ASCII character.