AlkantarClanX12
Current Path : /opt/alt/python33/lib64/python3.3/__pycache__/ |
Current File : //opt/alt/python33/lib64/python3.3/__pycache__/mailcap.cpython-33.pyo |
� ��f c @ s� d Z d d l Z d d g Z d d � Z d d � Z d d � Z d d � Z d d � Z d d g d d � Z d d d � Z g d d � Z d d � Z d d � Z d d � Z e d k r� e � n d S( u% Mailcap file handling. See RFC 1524.i Nu getcapsu findmatchc C s� i } x� t � D]� } y t | d � } Wn t k r@ w Yn X| � t | � } Wd QXxE | j � D]7 \ } } | | k r� | | | <qg | | | | | <qg Wq W| S( u� Return a dictionary containing the mailcap database. The dictionary maps a MIME type (in all lowercase, e.g. 'text/plain') to a list of dictionaries corresponding to mailcap entries. The list collects all the entries for that MIME type from all available mailcap files. Each dictionary contains key-value pairs for that MIME type, where the viewing command is stored with the key "view". u rN( u listmailcapfilesu openu IOErroru readmailcapfileu items( u capsu mailcapu fpu morecapsu keyu value( ( u, /opt/alt/python33/lib64/python3.3/mailcap.pyu getcaps s c C sp d t j k r1 t j d } | j t j � } n; d t j k rP t j d } n d } | d d d d g } | S( u7 Return a list of all mailcap files found on the system.u MAILCAPSu HOMEu .u /.mailcapu /etc/mailcapu /usr/etc/mailcapu /usr/local/etc/mailcap( u osu environu splitu pathsep( u pathstru mailcapsu home( ( u, /opt/alt/python33/lib64/python3.3/mailcap.pyu listmailcapfiles"