config root man

Current Path : /compat/linux/proc/self/root/usr/local/lib/python2.5/

FreeBSD hs32.drive.ne.jp 9.1-RELEASE FreeBSD 9.1-RELEASE #1: Wed Jan 14 12:18:08 JST 2015 root@hs32.drive.ne.jp:/sys/amd64/compile/hs32 amd64
Upload File :
Current File : //compat/linux/proc/self/root/usr/local/lib/python2.5/mimetypes.pyo

hRc@sQdZddkZddkZddkZddddddgZd	d
ddd
ddddg	Zeadd-dYZe	da
e	dae	dae	da
ddZdZdZeedjooddkZddkZdZddZy/eieiddd d!d"g\ZZWn%eij
oZedenXdZd#Zx]eD]U\ZZed.joed#qred/jo
d#Zqred0jo
dZqrqrWxeD]sZ eo,te eZ!e!p
d*Ge GHqEe!GHqt
e e\Z!Z"e!p
d*Ge GHqd+Ge!Gd,Ge"GHqWndS(1sGuess 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:

Data:

knownfiles -- list of files to parse
inited -- flag set when init() has been called
suffix_map -- dictionary mapping suffixes to suffixes
encodings_map -- dictionary mapping suffixes to encodings
types_map -- dictionary mapping suffixes to types

Functions:

init([files]) -- parse a list of files, default knownfiles
read_mime_types(file) -- parse one file, return a dictionary or None
iNt
guess_typetguess_extensiontguess_all_extensionstadd_typetread_mime_typestinits/etc/mime.typess/etc/httpd/mime.typess/etc/httpd/conf/mime.typess/etc/apache/mime.typess/etc/apache2/mime.typess$/usr/local/etc/httpd/conf/mime.typess"/usr/local/lib/netscape/mime.typess/usr/local/etc/mime.typest	MimeTypescBseeZdZdedZedZedZedZedZedZ	edZ
RS(	sMIME-types datastore.

    This datastore can handle information from mime.types-style files
    and supports basic determination of MIME type from a filename or
    URL, and can guess a reasonable extension given a MIME type.
    cCstptnti|_ti|_hhf|_hhf|_x-tiD]\}}|i||t	q[Wx-t
iD]\}}|i||tqWx|D]}|i||qWdS(N(
tinitedRt
encodings_maptcopyt
suffix_mapt	types_mapt
types_map_invtitemsRtTruetcommon_typestFalsetread(tselft	filenameststricttextttypetname((s%/usr/local/lib/python2.5/mimetypes.pyt__init__9s

cCsL||i||<|i|i|g}||jo|i|ndS(sAdd a mapping between a type and an extension.

        When the extension is already known, the new
        type will replace the old one. When the type
        is already known the extension will be added
        to the list of known extensions.

        If strict is true, information will be added to
        list of standard types, else to the list of non-standard
        types.
        N(RRt
setdefaulttappend(RRRRtexts((s%/usr/local/lib/python2.5/mimetypes.pyRGs
cCsti|\}}|djo|id}|djod	Sn|idd|}|djo|| }n|| }d|jp
d|jo
d}n|dfSnti|\}}x5||ijo$ti||i|\}}qW||ijo&|i|}	ti|\}}nd}	|it	}
||
jo|
||	fSnA|i
|
jo|
|i
|	fSn|od|	fSn|it}
||
jo|
||	fSn6|i
|
jo|
|i
|	fSnd|	fSdS(
s:Guess the type of a file based on its URL.

        Return value is a tuple (type, encoding) where type is None if
        the type can't be guessed (no or unknown suffix) or a string
        of the form type/subtype, usable for a MIME Content-type
        header; and encoding is None for no encoding or the name of
        the program used to encode (e.g. compress or gzip).  The
        mappings are table driven.  Encoding suffixes are case
        sensitive; type suffixes are first tried case sensitive, then
        case insensitive.

        The suffixes .tgz, .taz and .tz (case sensitive!) are all
        mapped to '.tar.gz'.  (This is table-driven too, using the
        dictionary suffix_map.)

        Optional `strict' argument when False adds a bunch of commonly found,
        but non-standard types.
        tdatat,it;t=t/s
text/plainN(NN(turllibt	splittypetfindtNonet	posixpathtsplitextR
RRRtlowerR(RturlRtschemetcommatsemiRtbaseRtencodingR((s%/usr/local/lib/python2.5/mimetypes.pyRXsB




%




cCsv|i}|iti|g}|pFxC|iti|gD]$}||jo|i|qFqFWn|S(sGuess the extensions for a file based on its MIME type.

        Return value is a list of strings giving the possible filename
        extensions, including the leading dot ('.').  The extension is not
        guaranteed to have been associated with any particular data stream,
        but would be mapped to the MIME type `type' by guess_type().

        Optional `strict' argument when false adds a bunch of commonly found,
        but non-standard types.
        (R'RRtgetRR(RRRt
extensionsR((s%/usr/local/lib/python2.5/mimetypes.pyRs
cCs)|i||}|pdSn|dS(sGuess the extension for a file based on its MIME type.

        Return value is a string giving a filename extension,
        including the leading dot ('.').  The extension is not
        guaranteed to have been associated with any particular data
        stream, but would be mapped to the MIME type `type' by
        guess_type().  If no extension can be guessed for `type', None
        is returned.

        Optional `strict' argument when false adds a bunch of commonly found,
        but non-standard types.
        iN(RR$(RRRR/((s%/usr/local/lib/python2.5/mimetypes.pyRs
cCs*t|}|i|||idS(s
        Read a single mime.types-format file, specified by pathname.

        If strict is true, information will be added to
        list of standard types, else to the list of non-standard
        types.
        N(topentreadfptclose(RtfilenameRtfp((s%/usr/local/lib/python2.5/mimetypes.pyRsc	Csx|i}|pPn|i}x;tt|D]'}||ddjo||3Pq:q:W|pqn|d|d}}x%|D]}|i|d||qWqdS(s
        Read a single mime.types-format file.

        If strict is true, information will be added to
        list of standard types, else to the list of non-standard
        types.
        it#it.N(treadlinetsplittrangetlenR(	RR4RtlinetwordstiRtsuffixestsuff((s%/usr/local/lib/python2.5/mimetypes.pyR1s 	((t__name__t
__module__t__doc__RRRRRRRR1(((s%/usr/local/lib/python2.5/mimetypes.pyR1s>cCstt||S(sGuess the type of a file based on its URL.

    Return value is a tuple (type, encoding) where type is None if the
    type can't be guessed (no or unknown suffix) or a string of the
    form type/subtype, usable for a MIME Content-type header; and
    encoding is None for no encoding or the name of the program used
    to encode (e.g. compress or gzip).  The mappings are table
    driven.  Encoding suffixes are case sensitive; type suffixes are
    first tried case sensitive, then case insensitive.

    The suffixes .tgz, .taz and .tz (case sensitive!) are all mapped
    to ".tar.gz".  (This is table-driven too, using the dictionary
    suffix_map).

    Optional `strict' argument when false adds a bunch of commonly found, but
    non-standard types.
    (RR(R(R((s%/usr/local/lib/python2.5/mimetypes.pyRscCstt||S(sGuess the extensions for a file based on its MIME type.

    Return value is a list of strings giving the possible filename
    extensions, including the leading dot ('.').  The extension is not
    guaranteed to have been associated with any particular data
    stream, but would be mapped to the MIME type `type' by
    guess_type().  If no extension can be guessed for `type', None
    is returned.

    Optional `strict' argument when false adds a bunch of commonly found,
    but non-standard types.
    (RR(RR((s%/usr/local/lib/python2.5/mimetypes.pyRs
cCstt||S(sGuess the extension for a file based on its MIME type.

    Return value is a string giving a filename extension, including the
    leading dot ('.').  The extension is not guaranteed to have been
    associated with any particular data stream, but would be mapped to the
    MIME type `type' by guess_type().  If no extension can be guessed for
    `type', None is returned.

    Optional `strict' argument when false adds a bunch of commonly found,
    but non-standard types.
    (RR(RR((s%/usr/local/lib/python2.5/mimetypes.pyRscCstt|||S(siAdd a mapping between a type and an extension.

    When the extension is already known, the new
    type will replace the old one. When the type
    is already known the extension will be added
    to the list of known extensions.

    If strict is true, information will be added to
    list of standard types, else to the list of non-standard
    types.
    (RR(RRR((s%/usr/local/lib/python2.5/mimetypes.pyRscCstat}|djo
t}nx8|D]0}tii|o|it	|q-q-W|i
a
|ia|ita|i
a
|ia|ia|ia|itadS(N(RRRR$t
knownfilestostpathtisfileR1R0RR
RRRRRRR(tfilestdbtfile((s%/usr/local/lib/python2.5/mimetypes.pyR#s 	

		
				cCsNyt|}Wntj
odSnXt}|i|t|itS(N(R0tIOErrorR$RR1RR(RItfRH((s%/usr/local/lib/python2.5/mimetypes.pyR8s		cCshdd<dd<dd<ahdd<dd<ahd	d
<dd<d
d<d
d<d
d<dd<dd<dd<dd<d	d<dd<dd<dd<dd<d d!<d"d#<d$d%<d	d&<d'd(<d'd)<d*d+<d,d-<dd.<d/d0<d	d1<d2d3<d4d5<dd6<d7d8<d9d:<d9d;<d<d=<d>d?<d>d@<d>dA<dBdC<ddD<dEdF<dGdH<dIdJ<dKdL<d,dM<d,dN<dOdP<dQdR<dSdT<dUdV<dUdW<dGdX<dGdY<dGdZ<dGd[<d\d]<dd^<d,d_<d	d`<d	da<dbdc<ddde<dfdg<dhdi<djdk<dddl<dmdn<ddo<dpdq<drds<dtdu<dtdv<dwdx<dtdy<dtdz<dd{<dtd|<d}d~<dd<dd<dQd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<d	d<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<d'd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<ahddA<dd<dd<dd<dd<dd<dd<dd<adS(Ns.tar.gzs.tgzs.tazs.tztgzips.gztcompresss.Zsapplication/octet-streams.asapplication/postscripts.aisaudio/x-aiffs.aifs.aifcs.aiffsaudio/basics.ausvideo/x-msvideos.avis
text/plains.batsapplication/x-bcpios.bcpios.binsimage/x-ms-bmps.bmps.csapplication/x-cdfs.cdfsapplication/x-netcdfsapplication/x-cpios.cpiosapplication/x-cshs.cshstext/csss.csss.dllsapplication/mswords.docs.dotsapplication/x-dvis.dvismessage/rfc822s.emls.epss
text/x-setexts.etxs.exes	image/gifs.gifsapplication/x-gtars.gtars.hsapplication/x-hdfs.hdfs	text/htmls.htms.htmls	image/iefs.iefs
image/jpegs.jpes.jpegs.jpgsapplication/x-javascripts.jss.kshsapplication/x-latexs.latexs
video/mpegs.m1vsapplication/x-troff-mans.mansapplication/x-troff-mes.mes.mhts.mhtmlsapplication/x-mifs.mifsvideo/quicktimes.movsvideo/x-sgi-movies.movies
audio/mpegs.mp2s.mp3s.mpas.mpes.mpegs.mpgsapplication/x-troff-mss.mss.ncs.nwss.os.objsapplication/odas.odasapplication/x-pkcs12s.p12sapplication/pkcs7-mimes.p7csimage/x-portable-bitmaps.pbmsapplication/pdfs.pdfs.pfxsimage/x-portable-graymaps.pgms.pls	image/pngs.pngsimage/x-portable-anymaps.pnmsapplication/vnd.ms-powerpoints.pots.ppasimage/x-portable-pixmaps.ppms.ppss.ppts.pss.pwzs
text/x-pythons.pysapplication/x-python-codes.pycs.pyos.qtsaudio/x-pn-realaudios.rasapplication/x-pn-realaudios.ramsimage/x-cmu-rasters.rassapplication/xmls.rdfsimage/x-rgbs.rgbsapplication/x-troffs.roffs
text/richtexts.rtxstext/x-sgmls.sgms.sgmlsapplication/x-shs.shsapplication/x-shars.shars.snds.sosapplication/x-wais-sources.srcsapplication/x-sv4cpios.sv4cpiosapplication/x-sv4crcs.sv4crcsapplication/x-shockwave-flashs.swfs.tsapplication/x-tars.tarsapplication/x-tcls.tclsapplication/x-texs.texsapplication/x-texinfos.texis.texinfos
image/tiffs.tifs.tiffs.trstext/tab-separated-valuess.tsvs.txtsapplication/x-ustars.ustarstext/x-vcards.vcfsaudio/x-wavs.wavs.wizs.wsdlsimage/x-xbitmaps.xbmsapplication/vnd.ms-excels.xlbsapplication/excels.xlsstext/xmls.xmls.xpdlsimage/x-xpixmaps.xpms.xslsimage/x-xwindowdumps.xwdsapplication/zips.zips	image/jpgs
audio/midis.mids.midis
image/picts.pcts.pics.pictsapplication/rtfs.rtfstext/xuls.xul(R
RRR(((s%/usr/local/lib/python2.5/mimetypes.pyt_default_mime_typesBs																																																																																																																																		t__main__s4Usage: mimetypes.py [options] type

Options:
    --help / -h       -- print this message and exit
    --lenient / -l    -- additionally search of some common, but non-standard
                         types.
    --extension / -e  -- guess extension instead of type

More than one type argument may be given.
tcCs&tGH|o	|GHnti|dS(N(tUSAGEtsystexit(tcodetmsg((s%/usr/local/lib/python2.5/mimetypes.pytusages	ithlethelptlenientt	extensionis-hs--helps-ls	--lenients-es--extensions I don't know anything about typestype:s	encoding:((s-hs--help(s-ls	--lenient(s-es--extension(#RBRDR%R!t__all__RCRRRRRRRRR$RRRNR@RRtgetoptRQRVtargvtoptstargsterrorRURRZtopttargtgtypetguessR-(((s%/usr/local/lib/python2.5/mimetypes.pys<module>sn			
	





	


Man Man