Mime types Index Page 1

How to find the mime type of a file in Python?

Here are some example on how to guess the mime type of a file using python. The first example uses the filename only and the second example opens the file to guess the mime type.