diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2009-11-15 14:25:16 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2009-11-15 14:25:16 (GMT) |
commit | b8108e2425546635176495dec0d70d3c87a1f309 (patch) | |
tree | bc52314e29d106ab4c243bbe8c296b43c2dd565b /Doc | |
parent | 6f1d04945b98cd66b95131833942526c85bbb867 (diff) | |
download | cpython-b8108e2425546635176495dec0d70d3c87a1f309.zip cpython-b8108e2425546635176495dec0d70d3c87a1f309.tar.gz cpython-b8108e2425546635176495dec0d70d3c87a1f309.tar.bz2 |
Merged revisions 76306 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk
........
r76306 | antoine.pitrou | 2009-11-15 15:10:48 +0100 (dim., 15 nov. 2009) | 4 lines
Issue #4969: The mimetypes module now reads the MIME database from
the registry under Windows. Patch by Gabriel Genellina.
........
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/mimetypes.rst | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/Doc/library/mimetypes.rst b/Doc/library/mimetypes.rst index fe1437a..d2d20d2 100644 --- a/Doc/library/mimetypes.rst +++ b/Doc/library/mimetypes.rst @@ -76,9 +76,13 @@ behavior of the module. Initialize the internal data structures. If given, *files* must be a sequence of file names which should be used to augment the default type map. If omitted, - the file names to use are taken from :const:`knownfiles`. Each file named in - *files* or :const:`knownfiles` takes precedence over those named before it. - Calling :func:`init` repeatedly is allowed. + the file names to use are taken from :const:`knownfiles`; on Windows, the + current registry settings are loaded. Each file named in *files* or + :const:`knownfiles` takes precedence over those named before it. Calling + :func:`init` repeatedly is allowed. + + .. versionchanged:: 3.2 + Previously, Windows registry settings were ignored. .. function:: read_mime_types(filename) @@ -228,3 +232,9 @@ MimeTypes Objects Load MIME type information from an open file. The file must have the format of the standard :file:`mime.types` files. + +.. method:: MimeTypes.read_windows_registry() + + Load MIME type information from the Windows registry. Availability: Windows. + + .. versionadded:: 3.2 |