MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/2/cwd/usr/local/ssl/lib/python2.4/mimetypes.pyo
m
=5Dc@sdZdkZdkZdkZddddddgZdd	d
d	dgZeadfd
YZe	da
e	dae	dae	da
edZdZhdd<dd<dd<ahdd<dd<ahdd<dd<d d!<d"d!<d#d!<d$d%<d&d'<d(d)<d*d+<d,d<d-d.<d/d)<d0d1<d0d2<d3d4<d5d6<d7d8<d9d<d:d;<d<d;<d=d><d?d@<dAd<dBdC<dDd<dEdF<dGdH<dId)<dJdK<dLdM<dNdM<dOdP<dQdR<dSdR<dTdR<dUdV<dWd)<dXdY<dZd[<d\d]<d^d_<d`d@<dad@<dbdc<ddde<dfdg<dhdi<djdi<dkd[<dld[<dmd[<dnd[<dodp<dqd2<drd@<dsd<dtd<dudv<dwdx<dydz<d{d|<d}d~<ddx<dd<dd)<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dde<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd%<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd<dd)<dd<dd<dd<dd;<dd<dd<dd<dd<dd<dd<dd<dd<dd<ahdTd<dd<dd<dd<dd<dd<dd<dd<aedjo}dkZdkZdZddZy/eieidddddg\ZZWn%eij
oZedenXdZdZ xoeD]g\Z!Z"e!ddfjoedn;e!ddfjo
dZne!ddfjo
dZ nqWx}eD]uZ#e o-te#eZ$e$o
dGe#GHne$GHn<t
e#e\Z$Z%e$o
dGe#GHndGe$GdGe%GHquWndS(sGuess 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
Nt
guess_typetguess_extensiontguess_all_extensionstadd_typetread_mime_typestinits/etc/mime.typess$/usr/local/etc/httpd/conf/mime.typess"/usr/local/lib/netscape/mime.typess/usr/local/etc/mime.typest	MimeTypescBsetZdZfedZedZedZedZedZedZ	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_maptcopytselft
suffix_mapt	types_mapt
types_map_invtitemstextttypeRtTruetcommon_typestFalset	filenamestnametreadtstrict(R
RRRRR((t/usr/lib/python2.4/mimetypes.pyt__init__5s

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
RRRR
t
setdefaulttextstappend(R
RRRR((RRCs

cCsti|\}}|djo|id}|djod	Sn|idd|}|djo|| }	n|| }	d|	jp
d|	jo
d}	n|	dfSnt	i
|\}}x5||ijo$t	i
||i|\}}qW||ijo&|i|}t	i
|\}}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	splittypeturltschemetfindtcommatNonetsemiRt	posixpathtsplitexttbaseRR
RRtencodingRRtlowerRR(R
R$RR)R-RR,R'R%RR((RRTsD




%




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.
        N(RR.R
R
Rtgett
extensionsRRRR(R
RRRR0((RRs

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(R
RRRR0R((R
RRR0((RRs
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(topentfilenametfpR
treadfpRtclose(R
R2RR3((RRsc	Csx|i}|pPn|i}x;tt|D]'}||ddjo||3Pq:q:W|pqn|d|d}}x%|D]}|i|d||qWqWdS(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.
        iit#t.N(R3treadlinetlinetsplittwordstrangetlentiRtsuffixestsuffR
RR(	R
R3RR@R>R;R9RR?((RR4s$	(t__name__t
__module__t__doc__RRRRRRRR4(((RR-s>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.
    N(RRR$R(R$R((RRscCstt||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.
    N(RRRR(RR((RRs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.
    N(RRRR(RR((RRscCstt|||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.
    N(RRRRR(RRR((RRscCstat}|djo
t}nx8|D]0}ti	i
|o|it|q-q-W|i
a
|ia|ita|ia|ia|ia|ia|itadS(N(RRRtdbtfilesR(t
knownfilestfiletostpathtisfileR4R1RRRRRRRRR(RERDRG((RRs&	

		
				cCsNyt|}Wntj
odSnXt}|i|t|i	tS(N(
R1RGtftIOErrorR(RRDR4RR(RGRKRD((RR4s		s.tgzs.tar.gzs.tazs.tzs.gztgzips.Ztcompresss.asapplication/octet-streams.aisapplication/postscripts.aifsaudio/x-aiffs.aifcs.aiffs.ausaudio/basics.avisvideo/x-msvideos.bats
text/plains.bcpiosapplication/x-bcpios.bins.bmpsimage/x-ms-bmps.cs.cdfsapplication/x-cdfsapplication/x-netcdfs.cpiosapplication/x-cpios.cshsapplication/x-cshs.cssstext/csss.dlls.docsapplication/mswords.dots.dvisapplication/x-dvis.emlsmessage/rfc822s.epss.etxs
text/x-setexts.exes.gifs	image/gifs.gtarsapplication/x-gtars.hs.hdfsapplication/x-hdfs.htms	text/htmls.htmls.iefs	image/iefs.jpes
image/jpegs.jpegs.jpgs.jssapplication/x-javascripts.kshs.latexsapplication/x-latexs.m1vs
video/mpegs.mansapplication/x-troff-mans.mesapplication/x-troff-mes.mhts.mhtmls.mifsapplication/x-mifs.movsvideo/quicktimes.moviesvideo/x-sgi-movies.mp2s
audio/mpegs.mp3s.mpas.mpes.mpegs.mpgs.mssapplication/x-troff-mss.ncs.nwss.os.objs.odasapplication/odas.p12sapplication/x-pkcs12s.p7csapplication/pkcs7-mimes.pbmsimage/x-portable-bitmaps.pdfsapplication/pdfs.pfxs.pgmsimage/x-portable-graymaps.pls.pngs	image/pngs.pnmsimage/x-portable-anymaps.potsapplication/vnd.ms-powerpoints.ppas.ppmsimage/x-portable-pixmaps.ppss.ppts.pss.pwzs.pys
text/x-pythons.pycsapplication/x-python-codes.pyos.qts.rasaudio/x-pn-realaudios.ramsapplication/x-pn-realaudios.rassimage/x-cmu-rasters.rdfsapplication/xmls.rgbsimage/x-rgbs.roffsapplication/x-troffs.rtxs
text/richtexts.sgmstext/x-sgmls.sgmls.shsapplication/x-shs.sharsapplication/x-shars.snds.sos.srcsapplication/x-wais-sources.sv4cpiosapplication/x-sv4cpios.sv4crcsapplication/x-sv4crcs.swfsapplication/x-shockwave-flashs.ts.tarsapplication/x-tars.tclsapplication/x-tcls.texsapplication/x-texs.texisapplication/x-texinfos.texinfos.tifs
image/tiffs.tiffs.trs.tsvstext/tab-separated-valuess.txts.ustarsapplication/x-ustars.vcfstext/x-vcards.wavsaudio/x-wavs.wizs.xbmsimage/x-xbitmaps.xlbsapplication/vnd.ms-excels.xlssapplication/excels.xmlstext/xmls.xpmsimage/x-xpixmaps.xsls.xwdsimage/x-xwindowdumps.zipsapplication/zips	image/jpgs.mids
audio/midis.midis.pcts
image/picts.pics.picts.rtfsapplication/rtfs.xulstext/xult__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(tUSAGEtmsgtsystexittcode(RURR((Rtusages	ithlethelptlenientt	extensionis-hs--helps-ls	--lenients-es--extensions I don't know anything about typestype:s	encoding:(&RCRHR*R"t__all__RFRRRRRRRRR(RRRRRRRARStgetoptRQRVtargvtoptstargsterrorRRRRZtopttargtgtypetguessR-(RR-RbRdR*R[R"RRRVR\RaR_RSRRRQRFRRZR^RcRH((Rt?sh				
!
9N