|
Server IP : 162.241.148.128 / Your IP : 216.73.216.48 Web Server : Apache System : Linux md-ht-9.webhostbox.net 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 User : caribhll ( 2226) PHP Version : 8.3.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON Directory (0755) : /opt/rh/rh-python35/root/usr/lib64/python3.5/__pycache__/ |
| [ Home ] | [ C0mmand ] | [ Upload File ] |
|---|
���\
� @ 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 � d S)z%Mailcap file handling. See RFC 1524.� N�getcaps� findmatchc C s� i } x� t � D]� } y t | d � } Wn t k
r@ w Yn X| � t | � } Wd QRXxE | j � D]7 \ } } | | k r� | | | <qh | | | | | <qh Wq W| S)a� 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".
�rN)�listmailcapfiles�open�OSError�readmailcapfile�items)�capsZmailcap�fpZmorecaps�key�value� r �7/opt/rh/rh-python35/root/usr/lib64/python3.5/mailcap.pyr 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)z7Return a list of all mailcap files found on the system.ZMAILCAPS�HOME�.z /.mailcapz/etc/mailcapz/usr/etc/mailcapz/usr/local/etc/mailcap)�os�environ�split�pathsep)ZpathstrZmailcaps�homer r r r "