← Back
Editing: Mime.cpython-311.pyc
� �u�c�f � �� � d Z ddlZddlZddlZddlZddlZddlmZ ddlZddl m Z mZ ddlm Z dZi ZdZdadZdaej d dk Zd� Zd5d �Z G d � de� � Z G d� d e� � Z G d� de� � Z G d� d� � Z G d� de� � Z G d� d� � Z G d� de� � Z! edd� � Z" edd� � Z# edd� � Z$ edd� � Z% edd� � Z& edd � � Z' edd!� � Z( edd"� � Z) edd#� � Z* edd$� � Z+d%a,d&� Z-d'� Z.d(� Z/d6d*�Z0d6d+�Z1d,� Z2d7d.�Z3d8d/�Z4d0� Z5erd1� Z6nd2� Z6da7d%a8d3� Z9d4� Z:dS )9a� This module is based on a rox module (LGPL): http://cvs.sourceforge.net/viewcvs.py/rox/ROX-Lib2/python/rox/mime.py?rev=1.21&view=log This module provides access to the shared MIME database. types is a dictionary of all known MIME types, indexed by the type name, e.g. types['application/x-python'] Applications can install information about MIME types by storing an XML file as <MIME>/packages/<application>.xml and running the update-mime-database command, which is provided by the freedesktop.org shared mime database package. See http://www.freedesktop.org/standards/shared-mime-info-spec/ for information about the format of these files. (based on version 0.13) � N)� BaseDirectory)�minidom� XML_NAMESPACE)�defaultdictz5http://www.freedesktop.org/standards/shared-mime-info� c �n � d� d� | j D � � � � � � � S )zGet text of XML node� c � � g | ] }|j �� S � )� nodeValue)�.0�ns �*/usr/lib/python3/dist-packages/xdg/Mime.py� <listcomp>z"_get_node_data.<locals>.<listcomp>/ s � �9�9�9�A�A�K�9�9�9� )�join� childNodes�strip)�nodes r �_get_node_datar - s1 � � �7�7�9�9���9�9�9�:�:�@�@�B�B�Br c �"