Python mimetypes Functions

EditRocket provides the following information on mimetypes functions in the Python source code builder.

add_type(type, ext[, strict]) - Add a mapping from the mimetype type to the extension ext.

guess_all_extensions(type[, strict]) - Guess the extensions for a file based on its MIME type, given by type.

guess_extension(type[, strict]) - Guess the extension for a file based on its MIME type, given by type.

guess_type(filename[, strict]) - Guess the type of a file based on its filename or URL, given by filename.

init([files]) - Initialize the internal data structures.

read_mime_types(filename) - Load the type map given in the file filename, if it exists.