Binary package “python3-binaryornot” in ubuntu noble

check if a file is binary or text (Python 3 module)

 This Python package provides a function to check if a file is a text
 file or a binary file. It uses the same heuristic as file(1) by
 looking at the first 1024 bytes of the file and checks that all
 characters are printable.
 .
 This package contains the Python 3 module.