Sindbad~EG File Manager
�
SԚg�@ � � � d dl mZmZ d dlmZmZ d dlmZ ed� � ed� � d dlZd dl Z d dl
Z
d dlZd dlZd dl
Z
d dlZd dlZd dlZd dlZd dlZdZdZ eed � � o eed
� � Zerd� Znd� Zd
� Zd� Zd� Zd� Z G d� dej � � Z G d� dej � � Zd� Ze dk r ej! � � dS dS )� )�verbose�
reap_children)�TESTFN�unlink)�
import_module�termios�fcntlN� I wish to buy a fish license.
� For my pet fish, Eric.
�
TIOCGWINSZ�
TIOCSWINSZc �$ � t | � � d S �N)�print��msgs �*/usr/local/lib/python3.11/test/test_pty.py�debugr s � �
�c�
�
�
�
�
� c � � d S r � r s r r r s � ��r c � � | � d� � r| � dd� � S | � d� � r| � dd� � S | S )Ns
�
�
)�endswith�replace)�datas r �normalize_outputr . sY � � �}�}�Y��� .��|�|�I�u�-�-�-��}�}�W��� ,��|�|�G�U�+�+�+��Kr c �Z � t j | dd�� � }|� � � S )N�rbF)�mode�closefd)�io�FileIO�readline)�fd�readers r � _readliner( B s+ � �B�
�Y�r��e�
4�
4�
4�F��?�?���r c � � t j t j � � t j | � � S # t j $ r Y nw xY w| S r )�tty� tcgetattr�pty�STDIN_FILENO�unittest�expectedFailure�error)�funs r �expectedFailureIfStdinIsTTYr2 G sR � �
��
�c�&�'�'�'��'��,�,�,���9�
�
�
���
�����Js �14 �A�Ac � � t j | |� � }|t |� � k r&t d| � dt |� � � d|� d�� � �d S )Nzshort write: os.write(z, z bytes) wrote z bytes)�os�write�len� Exception)r&