Kaydet (Commit) 752e28ad authored tarafından Andrew M. Kuchling's avatar Andrew M. Kuchling

Add example

üst 4b6d5378
......@@ -158,6 +158,20 @@ want more than one MIME-type database:
\versionadded{2.2}
\end{classdesc}
An example usage of the module:
\begin{verbatim}
>>> import mimetypes
>>> mimetypes.init()
>>> mimetypes.knownfiles
['/etc/mime.types', '/etc/httpd/mime.types', ... ]
>>> mimetypes.suffix_map['.tgz']
'.tar.gz'
>>> mimetypes.encodings_map['.gz']
'gzip'
>>> mimetypes.types_map['.tgz']
'application/x-tar-gz'
\end{verbatim}
\subsection{MimeTypes Objects \label{mimetypes-objects}}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment