%PDF- %PDF-
Direktori : /lib/python3/dist-packages/twisted/conch/__pycache__/ |
Current File : //lib/python3/dist-packages/twisted/conch/__pycache__/stdio.cpython-312.pyc |
� Ϫ�f� � �� � d Z ddlZddlZddlZddlZddlmZ ddlmZ ddl m Z mZmZm Z ddlmZmZmZ G d� de� Z G d � d ej( � Z G d� de� Zd � Zdd�Zedk( r e� yy)zC Asynchronous local terminal input handling @author: Jp Calderone � N)�ServerProtocol)�ColoredManhole)�defer�protocol�reactor�stdio)�failure�log�reflectc � � e Zd Zy)�UnexpectedOutputErrorN)�__name__� __module__�__qualname__� � �5/usr/lib/python3/dist-packages/twisted/conch/stdio.pyr r s � �r r c �6 � e Zd Zd� Zd� Zd� Zd� Zd� Zd� Zd� Z y) �TerminalProcessProtocolc �D � || _ t j � | _ y �N)�protor �Deferred�onConnection)�selfr s r �__init__z TerminalProcessProtocol.__init__ s � ��� �!�N�N�,��r c �~ � | j j | � | j j d � d | _ y r )r �makeConnectionr �callback)r s r �connectionMadez&TerminalProcessProtocol.connectionMade s0 � �� � �!�!�$�'����"�"�4�(� ��r c �: � | j j |� y)zj Write to the terminal. @param data: Data to write. @type data: L{bytes} N)� transport�write�r �datas r r# zTerminalProcessProtocol.write$ s � � �����T�"r c �: � | j j |� y)zs Receive data from the terminal. @param data: Data received. @type data: L{bytes} N)r �dataReceivedr$ s r �outReceivedz#TerminalProcessProtocol.outReceived- s � � � � ����%r c �� � | j j � | j �?| j j t j t |� � � d| _ yy)zt Report an error. @param data: Data to include in L{Failure}. @type data: L{bytes} N)r"