Home | History | Annotate | Download | only in library

Lines Matching full:mimetypes

1 :mod:`mimetypes` --- Map filenames to MIME types
4 .. module:: mimetypes
11 **Source code:** :source:`Lib/mimetypes.py`
15 The :mod:`mimetypes` module converts between a filename or URL and the MIME type
154 >>> import mimetypes
155 >>> mimetypes.init()
156 >>> mimetypes.knownfiles
158 >>> mimetypes.suffix_map['.tgz']
160 >>> mimetypes.encodings_map['.gz']
162 >>> mimetypes.types_map['.tgz']
168 MimeTypes Objects
171 The :class:`MimeTypes` class may be useful for applications which may want more
173 :mod:`mimetypes` module.
176 .. class:: MimeTypes(filenames=(), strict=True)
189 .. attribute:: MimeTypes.suffix_map
198 .. attribute:: MimeTypes.encodings_map
204 .. attribute:: MimeTypes.types_map
212 .. attribute:: MimeTypes.types_map_inv
220 .. method:: MimeTypes.guess_extension(type, strict=True)
226 .. method:: MimeTypes.guess_type(url, strict=True)
232 .. method:: MimeTypes.guess_all_extensions(type, strict=True)
238 .. method:: MimeTypes.read(filename, strict=True)
247 .. method:: MimeTypes.readfp(fp, strict=True)
256 .. method:: MimeTypes.read_windows_registry(strict=True)