HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux spn-python 5.15.0-89-generic #99-Ubuntu SMP Mon Oct 30 20:42:41 UTC 2023 x86_64
User: arjun (1000)
PHP: 8.1.2-1ubuntu2.20
Disabled: NONE
Upload Files
File: //lib/python3/dist-packages/ptyprocess/__pycache__/util.cpython-310.pyc
o

5��_�
�@s^zddlmZWney$ddlZddlZejejBdfdd�ZYnwGdd�de�ZdS)�)�whichNcs"dd�}tj���r|�|�r�SdS|durtj�dtj�}|s#dS|�tj�}tj	dkr^tj
|vr:|�dtj
�tj�dd��tj�}t�fd	d
�|D��rT�g}n
�fdd�|D�}n�g}t
�}|D](}tj�|�}||vr�|�|�|D]}	tj�||	�}
||
|�r�|
SqyqfdS)
aSGiven 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.
    
        cSs&tj�|�ot�||�otj�|�S�N)�os�path�exists�access�isdir)�fn�mode�r�1/usr/lib/python3/dist-packages/ptyprocess/util.py�
_access_checks�zwhich.<locals>._access_checkN�PATH�win32r�PATHEXT�c3s"�|]}����|���VqdSr)�lower�endswith��.0�ext��cmdrr�	<genexpr>1s� zwhich.<locals>.<genexpr>csg|]}�|�qSrrrrrr�
<listcomp>4szwhich.<locals>.<listcomp>)rr�dirname�environ�get�defpath�split�pathsep�sys�platform�curdir�insert�any�set�normcase�add�join)rr
rr
�pathext�files�seen�dir�normdir�thefile�namerrrrs<





��rc@seZdZdZdS)�PtyProcessErrorz%Generic error class for this package.N)�__name__�
__module__�__qualname__�__doc__rrrrr1Fsr1)	�shutilr�ImportErrorrr!�F_OK�X_OK�	Exceptionr1rrrr�<module>s�C