ó m”þfc@sªdZddlZddgZd„Zd„Zd„Zd„Zd „Zd d gd „Zdd „Z gd„Z d„Z d„Z d„Zedkr¦e ƒndS(s%Mailcap file handling. See RFC 1524.iÿÿÿÿNtgetcapst findmatchcCs¦i}x™tƒD]Ž}yt|dƒ}Wntk r?qnXt|ƒ}|jƒxE|jƒD]7\}}||krˆ|||§s(RR,tfilter(R R;R R>t MIMEtypes((s/usr/lib64/python2.7/mailcap.pyR8žs   c Cs`d}dt|ƒ}}x@||kr[||}|d}|dkr|dkrr|||d!}|d}n||}q||}|d}|dkr¬||}q|dkrÅ||}q|dkrÞ||}q|dkrJ|}x*||kr||d kr|d}qóW|||!} |d}|t| |ƒ}q|d|}qW|S( NRiit%s\tsttt{t}(R t findparam( R0R;R<R=tresR.R/R6R5tname((s/usr/lib64/python2.7/mailcap.pyR9ªs6               cCsO|jƒd}t|ƒ}x,|D]$}|| jƒ|kr#||Sq#WdS(NR*R(R"R (RKR=R/tp((s/usr/lib64/python2.7/mailcap.pyRIÊs    c Csôddl}tƒ}|jds0t|ƒdSx½tdt|jƒdƒD] }|j||d!}t|ƒdkrdGHdS|d}|d}t||d|ƒ\}}|sÂdGtGHqLdG|GHtj |ƒ}|rLd G|GHqLqLWdS( Niÿÿÿÿiis"usage: mailcap [MIMEtype file] ...iR)sNo viewer found fors Executing:s Exit status:( tsysRtargvtshowRR RttypeRR:( RMR R.targsR;tfileR@R?tsts((s/usr/lib64/python2.7/mailcap.pyR7Õs&    "    cCs¿dGHxtƒD]}d|GHqWH|s5tƒ}ndGHH|jƒ}|jƒxg|D]_}|GH||}xG|D]?}|jƒ}|jƒx|D]}d|G||GHq—WHqtWqXWdS(NsMailcap files:s sMailcap entries:s %-15s(RRtkeystsort(R tfntckeysRPR>R?RTtk((s/usr/lib64/python2.7/mailcap.pyROës&          t__main__(t__doc__Rt__all__RRRRR+RR,R8R9RIR7ROt__name__(((s/usr/lib64/python2.7/mailcap.pyts     &