File: //proc/1233/cwd/lib/python3/dist-packages/ptyprocess/__pycache__/ptyprocess.cpython-310.pyc
o
5��_�{ � @ sh d dl Z d dlZd dlZd dlZd dlZd dlZd dlZd dlZd dlZd dl Z d dl
Z
d dlZzd dlZW n
e
yC d dlZY nw d dlmZmZ ddlmZmZ e j�� Ze�d�pbe�d�ZerndZddlmZ nd Ze jd d
kZer~dd� Znd
d� ZG dd� de�Z G dd� de�Z!d\a"a#dd� Z$dd� Z%dd� Z&G dd� de'�Z(G dd� de(�Z)dS )� N)�STDIN_FILENO�CHILD� )�which�PtyProcessError�solaris�sunosF)� _fork_ptyT� c C s
t | g�S �N)�bytes��i� r �7/usr/lib/python3/dist-packages/ptyprocess/ptyprocess.py�_byte( s
r c C s t | �S r )�chrr
r r r r + s c @ � e Zd ZdS )�FileNotFoundErrorN��__name__�
__module__�__qualname__r r r r r . � r c @ r )�TimeoutErrorNr r r r r r / r r )NNc C s" t dur
tdur
dS zPddlm} m} d}dD ]#}ttd| d�}|du s*t|d�s+qz|�� }W q t y: Y qw |du rCt d��t
t�|�d | �}t
t�|�d | �}W n, tt
tt tjfy� zdd lm}m} ||}}W n
ty� d
\}}Y nw Y nw t|�at|�a dS )zkSet constants _EOF and _INTR.
This avoids doing potentially costly operations on module load.
Nr )�VEOF�VINTR)�stdin�stdoutz__%s__�filenozNo stream has a fileno� )�CEOF�CINTR)r
� )�_EOF�_INTR�termiosr r �getattr�sys�hasattrr �
ValueError�ord� tcgetattr�ImportError�OSError�IOError�errorr! r"