is_binary_file

sherpa.utils.is_binary_file(filename)[source]

Estimate if a file is a binary file.

Returns True if a non-printable character is found in the first 1024 bytes of the file.