Seldon wrote:
Hello, I need to determine programmatically a file type from its content/extension (much like the "file" UNIX command line utility)

I searched for a suitable Python library module, with little luck. Do you know something useful ?

Python-magic (http://pypi.python.org/pypi/python-magic/0.1) wraps libmagic -- the same thing that "file" uses -- but getting it on windows is a pain. I have never been able to do it, anyway.

A more cross-platform library with a similar scope is hachoir. Still seems to be available from PyPI, but the website seems to have fallen off the 'net.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to