Binary package “python-magic” in ubuntu trusty

File type determination library using "magic" numbers (Python bindings)

 This library can be used to classify files according to magic number tests. It
 implements the core functionality of the file command.
 .
 This package contains the Python bindings.