| Server IP : 209.205.66.10 / Your IP : 216.73.216.173 Web Server : Apache/2.4.52 (Ubuntu) System : Linux ammon 5.15.0-186-generic #196-Ubuntu SMP Sat Jun 20 16:09:34 UTC 2026 x86_64 User : ( 1006) PHP Version : 8.5.8 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/xdg/__pycache__/ |
Upload File : |
o
��_�� � @ s� d Z ddlZddlZddlZddlZddlZzddlm mZ W n e y3 ddl
m mZ Y nw ddlm
Z
mZ ddlmZ ddlmZ ddlmZ ddlZddlZdd� Zd d
� ZdZdZd
ZdZdZdZG dd� d�Z G dd� d�Z!G dd� d�Z"G dd� d�Z#G dd� d�Z$G dd� d�Z%G dd� d�Z&d\Z'Z(d d!� Z)d"d#� Z*d$d%� Z+d&d'� Z,G d(d)� d)e-�Z.G d*d+� d+�Z/d/d-d.�Z0dS )0a�
Implementation of the XDG Menu Specification
http://standards.freedesktop.org/menu-spec/
Example code:
from xdg.Menu import parse, Menu, MenuEntry
def print_menu(menu, tab=0):
for submenu in menu.Entries:
if isinstance(submenu, Menu):
print (" " * tab) + unicode(submenu)
print_menu(submenu, tab+1)
elif isinstance(submenu, MenuEntry):
print (" " * tab) + unicode(submenu.DesktopEntry)
print_menu(parse())
� N)�
xdg_data_dirs�xdg_config_dirs)�DesktopEntry)�ParsingError)�PY3c C sD t jdkrt�| �} t jdkrt�| �S t�| �S tj| t�� d�S )N)� � )r � ��id�ctx)�sys�version_info�ast�literal_eval�Constant�NameConstant�Name�Load)�name� r �*/usr/lib/python3/dist-packages/xdg/Menu.py�
_ast_const'