관리-도구
편집 파일: subprocess.cpython-34.pyc
� j f � @ s d d g Z d d l Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z d d l m Z e j Z e j Z e j Z Gd d � d e j e j � Z Gd d � d � Z e d d d d e j d d � � Z e d d d d d d d d d e j d d � � Z d S)�create_subprocess_exec�create_subprocess_shell� N� )�events)� protocols)�streams)�tasks)� coroutine)�loggerc sd e Z d Z d Z � f d d � Z d d � Z d d � Z d d � Z d d � Z d d � Z � S)�SubprocessStreamProtocolz0Like StreamReaderProtocol, but for a subprocess.c s@ t � j d | � | | _ d | _ | _ | _ d | _ d S)N�loop)�super�__init__�_limit�stdin�stdout�stderr� _transport)�self�limitr )� __class__� �7/opt/alt/python34/lib64/python3.4/asyncio/subprocess.pyr s z!SubprocessStreamProtocol.__init__c C s� | j j g } | j d k r5 | j d | j � n | j d k r[ | j d | j � n | j d k r� | j d | j � n d d j | � S)Nzstdin=%rz stdout=%rz stderr=%rz<%s>� )r �__name__r �appendr r �join)r �infor r r �__repr__ s z!SubprocessStreamProtocol.__repr__c C s� | | _ | j d � } | d k rX t j d | j d | j � | _ | j j | � n | j d � } | d k r� t j d | j d | j � | _ | j j | � n | j d � } | d k r� t j | d | d d d | j �| _ n d S)Nr r r � r �protocol�reader)r �get_pipe_transportr �StreamReaderr �_loopr Z set_transportr �StreamWriterr )r � transportZstdout_transportZstderr_transportZstdin_transportr r r �connection_made&