getmimetype module

This module contains a method to automatically detect the mimetype of files. Currently, type inference is solely based on the extension of a file. The class VhistFile uses this module to automatically derive mimetypes for workflow files without a user-specified filetype.

pyvhist.getmimetype.getMimeType(filename)

Tries to identify the MIME type of the given file, based on the file’s extension.

filename is the name of the file, for which you want to identify the MIME type.

This function is called automatically every type you create a VhistFile instance and do not explicitly specify a MIME type.

Previous topic

pythoninfo module

Next topic

Examples

This Page