determine file type

Gilles Lenfant glenfant at NOSPAM.bigfoot.com
Tue May 13 16:59:36 EDT 2003


"Lee Harr" <missive at frontiernet.net> a écrit dans le message de news:
slrnbc1oud.fm.missive at localhost.my.domain...
>
> Is there a method in the python standard library to determine
> the type of a file, similar to the unix file command?
>

Standard python packages don't include such stuff.
The "mimetypes" module might be of some help but it's based on the filename
extension, not the file content.

--Gilles





More information about the Python-list mailing list