Server IP : 209.38.156.173 / Your IP : 216.73.216.122 [ Web Server : Apache/2.4.52 (Ubuntu) System : Linux lakekumayuhotel 5.15.0-136-generic #147-Ubuntu SMP Sat Mar 15 15:53:30 UTC 2025 x86_64 User : root ( 0) PHP Version : 8.1.2-1ubuntu2.22 Disable Function : NONE Domains : 2 Domains MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : ON Directory : /lib/python3/dist-packages/pexpect/__pycache__/ |
Upload File : |
o ��!^� � @ s� d dl Z d dlZd dlZd dlZd dlZd dlZze W n ey( ejZY nw ej d dkr4e fZnee fZdd� Z d dd�Zdd� Zd d d �Zd dd�ZdS )� N� c C sh t j�| �}t j�|�sdS t �|�j}tj�d�r-t � � dkr-t |tjtjB tj B @ �S t �|t j�S )z�Checks that path is an executable regular file, or a symlink towards one. This is roughly ``os.path isfile(path) and os.access(path, os.X_OK)``. F�sunosr )�os�path�realpath�isfile�stat�st_mode�sys�platform� startswith�getuid�bool�S_IXUSR�S_IXGRP�S_IXOTH�access�X_OK)r �fpath�mode� r �//usr/lib/python3/dist-packages/pexpect/utils.py�is_executable_file s ���r c C sv t j�| �dkrt| �r| S |du rt j}|�d�}|st j}|�t j�}|D ]}t j� || �}t|�r8| S q'dS )z�This takes a given filename; tries to find it in the environment path; then checks if it is executable. This returns the full path to the filename if found and executable. Otherwise this returns None.� N�PATH) r r �dirnamer �environ�get�defpath�split�pathsep�join)�filename�env�p�pathlistr �ffr r r �which0 s �r'