guessing mime type without extension?

Michael Ströder michael at stroeder.com
Tue Jul 10 16:19:28 EDT 2001


Michael wrote:
> 
> Is there a way to guess a files mime type by content rather than extension
> similar to the way the Unix 'file' command works?

Take a look at the modules sndhdr and imghdr for images and
sounds. Don't know about others.

Ciao, Michael.



More information about the Python-list mailing list