Binary package “python-binaryornot” in ubuntu trusty

check if a file is binary or text (Python 2 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 2 module.