ok

Mini Shell

Direktori : /lib64/python3.6/asyncio/__pycache__/
Upload File :
Current File : //lib64/python3.6/asyncio/__pycache__/windows_utils.cpython-36.opt-2.pyc

3


 \��@s�ddlZejdkred��ddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
dddddgZd	Zej
Z
ejZej�Zeed�r�ejZnejejdfd
d�Zdded
�dd�ZGdd�d�ZGdd�dej�ZdS)�NZwin32z
win32 only�
socketpair�pipe�Popen�PIPE�
PipeHandlei c
Cs|tjkrd}n|tjkr d}ntd��|tjkr:td��|dkrJtd��tj|||�}z�|j|df�|jd�|j�dd�\}}tj|||�}yP|jd	�y|j	||f�Wnt
tfk
r�YnX|jd
�|j�\}}	Wn|j
��YnXWd|j
�X||fS)Nz	127.0.0.1z::1z?Only AF_INET and AF_INET6 socket address families are supportedz)Only SOCK_STREAM socket type is supportedrzOnly protocol zero is supported��FT)�socket�AF_INETZAF_INET6�
ValueError�SOCK_STREAMZbindZlistenZgetsocknameZsetblockingZconnect�BlockingIOError�InterruptedErrorZaccept�close)
Zfamily�type�proto�hostZlsockZaddrZportZcsockZssock�_�r�-/usr/lib64/python3.6/asyncio/windows_utils.pyr%s8






FT)�duplex�
overlapped�bufsizecCs"tjdtj�tt�fd�}|r>tj}tjtj	B}||}}ntj
}tj	}d|}}|tjO}|drp|tjO}|dr�tj}nd}d}	}
yZtj
||tjd||tjtj�}	tj||dtjtj|tj�}
tj|	dd�}|jd�|	|
fS|	dk	�rtj|	�|
dk	�rtj|
��YnXdS)Nz\\.\pipe\python-pipe-%d-%d-)�prefixrrT)r)�tempfileZmktemp�os�getpid�next�
_mmap_counter�_winapiZPIPE_ACCESS_DUPLEXZGENERIC_READZ
GENERIC_WRITEZPIPE_ACCESS_INBOUNDZFILE_FLAG_FIRST_PIPE_INSTANCEZFILE_FLAG_OVERLAPPEDZCreateNamedPipeZ	PIPE_WAITZNMPWAIT_WAIT_FOREVERZNULLZ
CreateFileZ
OPEN_EXISTINGZConnectNamedPipeZGetOverlappedResult�CloseHandle)rrrZaddressZopenmode�accessZobsizeZibsizeZflags_and_attribsZh1Zh2ZovrrrrSs@








c@sXeZdZdd�Zdd�Zedd��Zdd�Zej	d	�d
d�Z
dd
�Zdd�Zdd�Z
dS)rcCs
||_dS)N)�_handle)�self�handlerrr�__init__�szPipeHandle.__init__cCs*|jdk	rd|j}nd}d|jj|fS)Nz	handle=%r�closedz<%s %s>)r"�	__class__�__name__)r#r$rrr�__repr__�s
zPipeHandle.__repr__cCs|jS)N)r")r#rrrr$�szPipeHandle.handlecCs|jdkrtd��|jS)NzI/O operatioon on closed pipe)r"r)r#rrr�fileno�s
zPipeHandle.fileno)r cCs|jdk	r||j�d|_dS)N)r")r#r rrrr�s

zPipeHandle.closecCs*|jdk	r&tjd|t|d�|j�dS)Nzunclosed %r)�source)r"�warnings�warn�ResourceWarningr)r#rrr�__del__�s
zPipeHandle.__del__cCs|S)Nr)r#rrr�	__enter__�szPipeHandle.__enter__cCs|j�dS)N)r)r#�t�v�tbrrr�__exit__�szPipeHandle.__exit__N)r(�
__module__�__qualname__r%r)�propertyr$r*rr rr/r0r4rrrrr�scseZdZd�fdd�	Z�ZS)rNcs|d}}}d}	}
}|tkr@tddd�\}}	tj|tj�}n|}|tkrhtdd�\}
}
tj|
d�}n|}|tkr�td	d�\}}tj|d�}n|tkr�|}n|}z�y t�j|f|||d�|��Wn4x$|	|
|fD]}|dk	r�t	j
|�q�W�Yn>X|	dk	�rt|	�|_|
dk	�r"t|
�|_
|dk	�r6t|�|_Wd|tk�rNtj|�|tk�rbtj|�|tk�rvtj|�XdS)
NFT)rr)rr)�stdin�stdout�stderr)FT)TF)TF)rr�msvcrtZopen_osfhandler�O_RDONLY�STDOUT�superr%rr rr8r9r:r)r#�argsr8r9r:�kwdsZ	stdin_rfdZ
stdout_wfdZ
stderr_wfdZstdin_whZ	stdout_rhZ	stderr_rhZstdin_rhZ	stdout_whZ	stderr_wh�h)r'rrr%�sH









zPopen.__init__)NNN)r(r5r6r%�
__classcell__rr)r'rr�s)TT)�sys�platform�ImportErrorr�	itertoolsr;rr	�
subprocessrr,�__all__ZBUFSIZErr=�countr�hasattrrr
rrrrrrrr�<module>s*

.0-

Zerion Mini Shell 1.0