title: Python analog for linux "file" command
body: <p>I'm looking for <code>file</code> linux command analog made in Python. It should provide information about file type as described in <code>man file</code>. Minimal feature set I'm looking for is to determine if file is raw or text (human-readable) one. Wrapper library will be good suggestion.
  I know, I can run <code>file</code> as subprocess and grab it's output to determine file type. But my program is supposed to parse thousands of files and I'm afraid of very long execution time in this case. </p>