HEX
Server: Apache
System: Linux scp1.abinfocom.com 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64
User: confeduphaar (1010)
PHP: 8.1.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //proc/self/root/lib/python3/dist-packages/ptyprocess/__pycache__/util.cpython-38.pyc
U

�ԁ^�
�@s`zddlmZWn:ek
rJddlZddlZejejBdfdd�ZYnXGdd�de�ZdS)�)�whichNcs"dd�}tj���r&|�|�r"�SdS|dkr>tj�dtj�}|sFdS|�tj�}tj	dkr�tj
|krt|�dtj
�tj�dd��tj�}t�fd	d
�|D��r��g}q‡fdd�|D�}n�g}t
�}|D]P}tj�|�}||kr�|�|�|D](}	tj�||	�}
||
|�r�|
Sq�q�dS)
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�|�o$t�||�o$tj�|�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�PATHZwin32rZPATHEXT�c3s |]}����|���VqdSr)�lower�endswith��.0Zext��cmdrr�	<genexpr>1szwhich.<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
Zpathext�files�seen�dirZnormdirZthefile�namerrrrs8





rc@seZdZdZdS)�PtyProcessErrorz%Generic error class for this package.N)�__name__�
__module__�__qualname__�__doc__rrrrr+Fsr+)	Zshutilr�ImportErrorrr�F_OK�X_OK�	Exceptionr+rrrr�<module>s
?