Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(1)  |  Call(0)  |  Derive(0)  |  Import(1)
Guess the MIME type of a file.

This module defines two useful functions:

guess_type(url, strict=1) -- guess the MIME type and encoding of a URL.

guess_extension(type, strict=1) -- guess the extension for a given MIME type.

It also contains the following, for tuning the behavior:
(more...)

src/s/a/sahriswiki-0.8.1/sahriswiki/utils.py   sahriswiki(Download)
import re
 
from circuits.web.tools import mimetypes
 
NEWLINES = re.compile("\n|\r[^\n]|\r\n")