determine file type

Lee Harr missive at frontiernet.net
Tue May 13 12:20:45 EDT 2003


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







More information about the Python-list mailing list