%PDF- %PDF-
Direktori : /lib/python3/dist-packages/xdg/__pycache__/ |
Current File : //lib/python3/dist-packages/xdg/__pycache__/util.cpython-312.pyc |
� �u�c� � � � d dl Z e j d dk\ Zerd� Znd� Z d dlmZ y# e$ r$ d dlZej ej z dfd�ZY yw xY w)� N� c � � | S �N� ��ss �*/usr/lib/python3/dist-packages/xdg/util.py�ur s � ��� c �$ � | j d� S )Nzutf-8)�decoder s r r r s � ��x�x�� � r )�whichc �b � � d� }t j j � � r |� |� r� S y|xs. t j j dt j � j t j � }t j dk( r�t j |vr |j dt j � t j j dd� j t j � }t � fd�|D � � r� g}n|D �cg c] }� |z �� }}n� g}t � }|D ]m }t j j |� } | |vs�'|j | � |D ]1 } t j j! || � } |||� s�-|c c S �o yc c}w ) aK Given a command, mode, and a PATH string, return the path which conforms to the given mode on the PATH, or None if there is no such file. `mode` defaults to os.F_OK | os.X_OK. `path` defaults to the result of os.environ.get("PATH"), or can be overridden with a custom search path. c � � t j j | � xr8 t j | |� xr t j j | � S r )�os�path�exists�access�isdir)�fn�modes r � _access_checkzwhich.<locals>._access_check sA � ��G�G�N�N�2�&� .�2�9�9�R��+>� .��G�G�M�M�"�-�-� /r N�PATH�win32r �PATHEXT� c 3 �x �K � | ]1 }�j � j |j � � �� �3 y �wr )�lower�endswith)�.0�ext�cmds �r � <genexpr>zwhich.<locals>.<genexpr>9 s( �� �� �H��3�9�9�;�'�'�� � ��4�H�s �7:)r r �dirname�environ�get�defpath�split�pathsep�sys�platform�curdir�insert�any�set�normcase�add�join)r"