Is there a method in the python standard library to determine the type of a file, similar to the unix file command? ie, from my shell prompt: >file index_html index_html: HTML document text >file images/bg6 images/bg6: PNG image data, 64 x 64, 8-bit/color RGB, non-interlaced