AlkantarClanX12

Your IP : 3.139.236.93


Current Path : /opt/alt/python33/lib64/python3.3/multiprocessing/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/multiprocessing/__pycache__/connection.cpython-33.pyc

�
��fyuc@s�ddddgZddlZddlZddlZddlZddlZddlZddlZddlZddl	Z	ddl
Z
ddlZddlZddl
mZmZmZddlmZmZmZmZddlmZy,ddlZdd	lmZmZmZWn-ek
rKejd
krA�ndZYnXdZdZ ej!�Z"d
Z#d
gZ$e%ed�r�dZ#e$dg7Z$nejd
kr�dZ#e$dg7Z$ne dd�Z&dd�Z'dd�Z(dd�Z)dd�Z*Gdd�d�Z+er.Gdd�de+�Z,nGdd�de+�Z-Gd d�de.�Z/ddd!d�Z0ejd
kr�dHd"d�Z2ndHd#d�Z2Gd$d%�d%e.�Z3d&d'�Z4ejd
kr�Gd(d)�d)e.�Z5d*d+�Z6nd,Z7d-Z8d.Z9d/Z:d0d1�Z;d2d3�Z<Gd4d5�d5e.�Z=d6d7�Z>d8d9�Z?Gd:d;�d;e/�Z@d<d=�ZAejd
kr�d>d?�ZBejCejDhZEdd@d�ZFn9e%edA�r�dBdC�ZGndDdC�ZGddEd�ZFejd
krHdFdGlHmIZIejJejeIjK�ejJe-eIjL�ejJe,eIjM�nRydFdGlHmIZIWnek
rpYn*XejJejeIjK�ejJe-eIjL�dS(IuClientuListeneruPipeuwaitiN(ucurrent_processuAuthenticationErroruBufferTooShort(uget_temp_diruFinalizeu	sub_debugudebug(uForkingPickler(u
WAIT_OBJECT_0uWAIT_TIMEOUTuINFINITEuwin32i g4@uAF_INETuAF_UNIXuAF_PIPEcCstj�|S(N(utime(utimeout((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
_init_timeout:su
_init_timeoutcCstj�|kS(N(utime(ut((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_check_timeout=su_check_timeoutcCsw|dkrdS|dkr5tjdddt��S|dkrgtjdd	tj�tt�f�Std
��dS(
u?
    Return an arbitrary free address for the given family
    uAF_INETu	localhostiuAF_UNIXuprefixu	listener-udiruAF_PIPEu\\.\pipe\pyc-%d-%d-uunrecognized familyN(u	localhosti(utempfileumktempuget_temp_diruosugetpidunextu
_mmap_counteru
ValueError(ufamily((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuarbitrary_addressDsuarbitrary_addresscCsrtjdkr.|dkr.td|��ntjdkrn|dkrntt|�sntd|��qnndS(uD
    Checks if the family is valid for the current environment.
    uwin32uAF_PIPEuFamily %s is not recognized.uAF_UNIXN(usysuplatformu
ValueErroruhasattrusocket(ufamily((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_validate_familyRs
u_validate_familycCset|�tkrdSt|�tkr;|jd�r;dSt|�tkrQdStd|��dS(u]
    Return the types of the address

    This can be 'AF_INET', 'AF_UNIX', or 'AF_PIPE'
    uAF_INETu\\uAF_PIPEuAF_UNIXuaddress type of %r unrecognizedN(utypeutupleustru
startswithu
ValueError(uaddress((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuaddress_type^s!uaddress_typecBs%|EeZdZd)Zd*d*dd�Zdd�Zdd�Zdd�Z	d	d
�Z
dd�Zed
d��Z
edd��Zedd��Zdd�Zdd�Zdd)dd�Zdd�Zd)dd�Zddd�Zd d!�Zd"d#d$�Zd%d&�Zd'd(�Zd)S(+u_ConnectionBasecCsc|j�}|dkr'td��n|rD|rDtd��n||_||_||_dS(Niuinvalid handleu6at least one of `readable` and `writable` must be True(u	__index__u
ValueErroru_handleu	_readableu	_writable(uselfuhandleureadableuwritable((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__init__ts		u_ConnectionBase.__init__cCs |jdk	r|j�ndS(N(u_handleuNoneu_close(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__del__�su_ConnectionBase.__del__cCs"|jdkrtd��ndS(Nuhandle is closed(u_handleuNoneuIOError(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
_check_closed�su_ConnectionBase._check_closedcCs|jstd��ndS(Nuconnection is write-only(u	_readableuIOError(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_check_readable�s	u_ConnectionBase._check_readablecCs|jstd��ndS(Nuconnection is read-only(u	_writableuIOError(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_check_writable�s	u_ConnectionBase._check_writablecCs/|jrd|_n
|j�td��dS(Nubad message lengthF(u	_writableuFalseu	_readableucloseuIOError(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_bad_message_length�s	
u#_ConnectionBase._bad_message_lengthcCs
|jdkS(u True if the connection is closedN(u_handleuNone(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuclosed�su_ConnectionBase.closedcCs|jS(u"True if the connection is readable(u	_readable(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyureadable�su_ConnectionBase.readablecCs|jS(u"True if the connection is writable(u	_writable(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuwritable�su_ConnectionBase.writablecCs|j�|jS(u+File descriptor or handle of the connection(u
_check_closedu_handle(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyufileno�s
u_ConnectionBase.filenocCs1|jdk	r-z|j�Wdd|_XndS(uClose the connectionN(u_handleuNoneu_close(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuclose�su_ConnectionBase.closeicCs�|j�|j�t|�}|jdkrDtt|��}nt|�}|dkrktd��n||kr�td��n|dkr�||}n:|dkr�td��n|||kr�td��n|j||||��dS(u,Send the bytes data from a bytes-like objectiiuoffset is negativeubuffer length < offsetusize is negativeubuffer length < offset + sizeN(	u
_check_closedu_check_writableu
memoryviewuitemsizeubytesulenu
ValueErroruNoneu_send_bytes(uselfubufuoffsetusizeumun((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
send_bytes�s"


u_ConnectionBase.send_bytescCsP|j�|j�tj�}t|tj�j|�|j|j	��dS(uSend a (picklable) objectN(
u
_check_closedu_check_writableuiouBytesIOuForkingPicklerupickleuHIGHEST_PROTOCOLudumpu_send_bytesu	getbuffer(uselfuobjubuf((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyusend�s


u_ConnectionBase.sendcCsm|j�|j�|dk	r;|dkr;td��n|j|�}|dkrc|j�n|j�S(u7
        Receive bytes data as a bytes object.
        iunegative maxlengthN(u
_check_closedu_check_readableuNoneu
ValueErroru_recv_bytesu_bad_message_lengthugetvalue(uselfu	maxlengthubuf((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
recv_bytes�s


u_ConnectionBase.recv_bytescCs�|j�|j�t|���}|j}|t|�}|dkrWtd��n||krrtd��n|j�}|j�}|||kr�t|j	���n|j
d�|j||||||��|SWdQXdS(ur
        Receive bytes data into a writeable buffer-like object.
        Return the number of bytes read.
        iunegative offsetuoffset too largeN(u
_check_closedu_check_readableu
memoryviewuitemsizeulenu
ValueErroru_recv_bytesutelluBufferTooShortugetvalueuseekureadinto(uselfubufuoffsetumuitemsizeubytesizeuresultusize((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyurecv_bytes_into�s"

	
u_ConnectionBase.recv_bytes_intocCs3|j�|j�|j�}tj|j��S(uReceive a (picklable) object(u
_check_closedu_check_readableu_recv_bytesupickleuloadsu	getbuffer(uselfubuf((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyurecv�s

u_ConnectionBase.recvgcCs!|j�|j�|j|�S(u/Whether there is any input available to be read(u
_check_closedu_check_readableu_poll(uselfutimeout((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyupoll�s

u_ConnectionBase.pollcCs|S(N((uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu	__enter__su_ConnectionBase.__enter__cCs|j�dS(N(uclose(uselfuexc_typeu	exc_valueuexc_tb((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__exit__su_ConnectionBase.__exit__NT(u__name__u
__module__u__qualname__uNoneu_handleuTrueu__init__u__del__u
_check_closedu_check_readableu_check_writableu_bad_message_lengthupropertyuclosedureadableuwritableufilenoucloseu
send_bytesusendu
recv_bytesurecv_bytes_intourecvupollu	__enter__u__exit__(u
__locals__((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_ConnectionBaseqs(

u_ConnectionBasecBse|EeZdZdZd
Zejdd�Zdd�Z	ddd�Zdd	�Zd
d�Z
dS(uPipeConnectionu�
        Connection class based on a Windows named pipe.
        Overlapped I/O is used, so the handles must have been created
        with FILE_FLAG_OVERLAPPED.
        cCs||j�dS(N(u_handle(uselfu_CloseHandle((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_closesuPipeConnection._closecCs�tj|j|dd�\}}z_yC|tjkrftj|jgdt�}|t	ksft
�nWn|j��YnXWd|jd�\}}X|dks�t
�|t
|�ks�t
�dS(Nu
overlappediTF(u_winapiu	WriteFileu_handleuTrueuERROR_IO_PENDINGuWaitForMultipleObjectsueventuFalseuINFINITEu
WAIT_OBJECT_0uAssertionErrorucanceluGetOverlappedResultulen(uselfubufuovuerruwaitresunwritten((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_send_bytess!
uPipeConnection._send_bytesc	Cs~|jrd|_tj�S|dkr.dnt|d�}y�tj|j|dd�\}}z_yC|tj
kr�tj|jgdt
�}|tks�t�nWn|j��YnXWd|jd�\}}|dkrtj�}|j|j��|S|tjkr&|j||�SXWnCtk
rm}z#|jtjkrXt�n�WYdd}~XnXtd��dS(Ni�u
overlappediu.shouldn't get here; expected KeyboardInterruptFT(u_got_empty_messageuFalseuiouBytesIOuNoneuminu_winapiuReadFileu_handleuTrueuERROR_IO_PENDINGuWaitForMultipleObjectsueventuINFINITEu
WAIT_OBJECT_0uAssertionErrorucanceluGetOverlappedResultuwriteu	getbufferuERROR_MORE_DATAu_get_more_datauIOErroruwinerroruERROR_BROKEN_PIPEuEOFErroruRuntimeError(	uselfumaxsizeubsizeuovuerruwaitresunreadufue((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_recv_bytes's6		
!
	uPipeConnection._recv_bytescCs?|js%tj|j�ddkr)dStt|g|��S(NiT(u_got_empty_messageu_winapiu
PeekNamedPipeu_handleuTrueubooluwait(uselfutimeout((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_pollGs	uPipeConnection._pollcCs�|j�}tj�}|j|�tj|j�d}|dksMt�|dk	r|t	|�||kr||j
�ntj|j|dd�\}}|j
d�\}}|dks�t�||ks�t�|j|j��|S(Niiu
overlappedT(u	getbufferuiouBytesIOuwriteu_winapiu
PeekNamedPipeu_handleuAssertionErroruNoneulenu_bad_message_lengthuReadFileuTrueuGetOverlappedResult(uselfuovumaxsizeubufufuleftuerrurbytes((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_get_more_dataMs
"
!uPipeConnection._get_more_dataNF(u__name__u
__module__u__qualname__u__doc__uFalseu_got_empty_messageu_winapiuCloseHandleu_closeu_send_bytesuNoneu_recv_bytesu_pollu_get_more_data(u
__locals__((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuPipeConnection
s uPipeConnectioncBs�|EeZdZdZerCejdd�ZejZ	ej
Zn$ej
dd�ZejZ	ejZe	dd�Zedd�Zd	d
�Zddd�Zd
d�ZdS(u
Connectionuo
    Connection class based on an arbitrary file descriptor (Unix only), or
    a socket handle (Windows).
    cCs||j�dS(N(u_handle(uselfu_close((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_closedsuConnection._closecCs||j�dS(N(u_handle(uselfu_close((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_closeiscCsnt|�}x[y||j|�}Wntk
r<wYnX||8}|dkrWPn||d�}qdS(Ni(ulenu_handleuInterruptedError(uselfubufuwriteu	remainingun((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_sendns

uConnection._sendcCs�tj�}|j}|}x�|dkr�y|||�}Wntk
rTwYnXt|�}|dkr�||kr�t�q�td��n|j|�||8}qW|S(Niugot end of file during message(uiouBytesIOu_handleuInterruptedErrorulenuEOFErroruIOErroruwrite(uselfusizeureadubufuhandleu	remaininguchunkun((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_recvzs 	
	
uConnection._recvcCs�t|�}tjd|�}|dkr9||g}n%|dkrU||g}n	|g}x|D]}|j|�qeWdS(Nu!ii@i(ulenustructupacku_send(uselfubufunuheaderuchunksuchunk((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_send_bytes�s	
uConnection._send_bytescCsS|jd�}tjd|j��\}|dk	rF||krFdS|j|�S(Niu!i(u_recvustructuunpackugetvalueuNone(uselfumaxsizeubufusize((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_recv_bytes�s
uConnection._recv_bytescCst|g|�}t|�S(N(uwaitubool(uselfutimeoutur((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_poll�suConnection._pollN(u__name__u
__module__u__qualname__u__doc__u_winapiu_multiprocessinguclosesocketu_closeusendu_writeurecvu_readuosucloseuwriteureadu_sendu_recvu_send_bytesuNoneu_recv_bytesu_poll(u
__locals__((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
Connection]s			u
ConnectioncBs�|EeZdZdZdddddd�Zdd�Zdd�Zed	d
��Z	edd
��Z
dd
�Zdd�ZdS(uListeneru�
    Returns a listener object.

    This is a wrapper for a bound socket which is 'listening' for
    connections, or for a Windows named pipe.
    icCs�|p|rt|�pt}|p-t|�}t|�|dkr[t||�|_nt|||�|_|dk	r�t|t	�r�t
d��n||_dS(NuAF_PIPEuauthkey should be a byte string(uaddress_typeudefault_familyuarbitrary_addressu_validate_familyuPipeListeneru	_listeneruSocketListeneruNoneu
isinstanceubytesu	TypeErroru_authkey(uselfuaddressufamilyubackloguauthkey((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__init__�s
uListener.__init__cCs]|jdkrtd��n|jj�}|jrYt||j�t||j�n|S(uz
        Accept a connection on the bound socket or named pipe of `self`.

        Returns a `Connection` object.
        ulistener is closedN(u	_listeneruNoneuIOErroruacceptu_authkeyudeliver_challengeuanswer_challenge(uselfuc((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuaccept�s	uListener.acceptcCs,|jdk	r(|jj�d|_ndS(uA
        Close the bound socket or named pipe of `self`.
        N(u	_listeneruNoneuclose(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuclose�s
uListener.closecCs
|jjS(N(u	_listeneru_address(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu<lambda>�suListener.<lambda>cCs
|jjS(N(u	_listeneru_last_accepted(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu<lambda>�scCs|S(N((uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu	__enter__�suListener.__enter__cCs|j�dS(N(uclose(uselfuexc_typeu	exc_valueuexc_tb((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__exit__�suListener.__exit__N(
u__name__u
__module__u__qualname__u__doc__uNoneu__init__uacceptucloseupropertyuaddressu
last_acceptedu	__enter__u__exit__(u
__locals__((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuListener�scCs�|pt|�}t|�|dkr7t|�}nt|�}|dk	rnt|t�rntd��n|dk	r�t||�t	||�n|S(u=
    Returns a connection to the address of a `Listener`
    uAF_PIPEuauthkey should be a byte stringN(
uaddress_typeu_validate_familyu
PipeClientuSocketClientuNoneu
isinstanceubytesu	TypeErroruanswer_challengeudeliver_challenge(uaddressufamilyuauthkeyuc((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuClient�s

cCs�|rYtj�\}}|jd�|jd�t|j��}t|j��}n6tj�\}}t|dd�}t|dd�}||fS(uL
        Returns pair of connection objects at either end of a pipe
        uwritableureadableTF(	usocketu
socketpairusetblockinguTrueu
ConnectionudetachuosupipeuFalse(uduplexus1us2uc1uc2ufd1ufd2((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuPipe�s

c
	CsStd�}|r;tj}tjtjB}tt}}ntj}tj}dt}}tj||tjBtj	Btj
tjBtjBd||tj
tj�}tj||dtjtjtjtj�}tj|tjdd�tj|dd�}|jd�\}	}
|
dks%t�t|d|�}t|d|�}||fS(	uL
        Returns pair of connection objects at either end of a pipe
        uAF_PIPEiiu
overlappeduwritableureadableNT(uarbitrary_addressu_winapiuPIPE_ACCESS_DUPLEXuGENERIC_READu
GENERIC_WRITEuBUFSIZEuPIPE_ACCESS_INBOUNDuCreateNamedPipeuFILE_FLAG_OVERLAPPEDuFILE_FLAG_FIRST_PIPE_INSTANCEuPIPE_TYPE_MESSAGEuPIPE_READMODE_MESSAGEu	PIPE_WAITuNMPWAIT_WAIT_FOREVERuNULLu
CreateFileu
OPEN_EXISTINGuSetNamedPipeHandleStateuNoneuConnectNamedPipeuTrueuGetOverlappedResultuAssertionErroruPipeConnection(
uduplexuaddressuopenmodeuaccessuobsizeuibsizeuh1uh2u
overlappedu_uerruc1uc2((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuPipes2			


cBsA|EeZdZdZddd�Zdd�Zdd�Zd	S(
uSocketListeneruO
    Representation of a socket which is bound to an address and listening
    icCstjtt|��|_yttjdkrL|jjtjtjd�n|jjd�|jj
|�|jj|�|jj�|_
Wn"tk
r�|jj��YnX||_d|_|dkr�t|tjd|fdd�|_n	d|_dS(NuposixiuAF_UNIXuargsuexitpriorityiT(usocketugetattru_socketuosunameu
setsockoptu
SOL_SOCKETuSO_REUSEADDRusetblockinguTrueubindulistenugetsocknameu_addressuOSErrorucloseu_familyuNoneu_last_accepteduFinalizeuunlinku_unlink(uselfuaddressufamilyubacklog((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__init__?s$

		$uSocketListener.__init__cCsUx5y|jj�\}|_Wntk
r3YqXPq|jd�t|j��S(NT(u_socketuacceptu_last_accepteduInterruptedErrorusetblockinguTrueu
Connectionudetach(uselfus((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuacceptWs

uSocketListener.acceptcCs-|jj�|jdk	r)|j�ndS(N(u_socketucloseu_unlinkuNone(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuclosebs
uSocketListener.closeN(u__name__u
__module__u__qualname__u__doc__u__init__uacceptuclose(u
__locals__((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuSocketListener;suSocketListenerc	Cs[t|�}tjtt|���1}|jd�|j|�t|j��SWdQXdS(uO
    Return a connection object connected to the socket given by `address`
    NT(uaddress_typeusocketugetattrusetblockinguTrueuconnectu
Connectionudetach(uaddressufamilyus((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuSocketClienths


uSocketClientcBsV|EeZdZdZd
dd�Zddd�Zdd�Ze	dd	��Z
d
S(uPipeListeneru0
        Representation of a named pipe
        cCsk||_|jdd�g|_d|_td|j�t|tj	d|j|jfdd�|_
dS(Nufirstu listener created with address=%ruargsuexitpriorityiT(u_addressu_new_handleuTrueu
_handle_queueuNoneu_last_acceptedu	sub_debuguFinalizeuPipeListeneru_finalize_pipe_listeneruclose(uselfuaddressubacklog((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__init__|s		uPipeListener.__init__c	CsetjtjB}|r&|tjO}ntj|j|tjtjBtjBtj	t
t
tjtj�S(N(
u_winapiuPIPE_ACCESS_DUPLEXuFILE_FLAG_OVERLAPPEDuFILE_FLAG_FIRST_PIPE_INSTANCEuCreateNamedPipeu_addressuPIPE_TYPE_MESSAGEuPIPE_READMODE_MESSAGEu	PIPE_WAITuPIPE_UNLIMITED_INSTANCESuBUFSIZEuNMPWAIT_WAIT_FOREVERuNULL(uselfufirstuflags((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_new_handle�s	
uPipeListener._new_handlecCs�|jj|j��|jjd�}ytj|dd�}Wn=tk
r�}z|jtj	krn�nWYdd}~XntXzHytj
|jgdt
�}Wn"|j�tj|��YnXWd|jd�\}}|dks�t�Xt|�S(Niu
overlappedTF(u
_handle_queueuappendu_new_handleupopu_winapiuConnectNamedPipeuTrueuOSErroruwinerroru
ERROR_NO_DATAuWaitForMultipleObjectsueventuFalseuINFINITEucanceluCloseHandleuGetOverlappedResultuAssertionErroruPipeConnection(uselfuhandleuovueuresu_uerr((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuaccept�s"

uPipeListener.acceptcCs/td|�x|D]}tj|�qWdS(Nu closing listener with address=%r(u	sub_debugu_winapiuCloseHandle(uqueueuaddressuhandle((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_finalize_pipe_listener�s

u$PipeListener._finalize_pipe_listenerNF(u__name__u
__module__u__qualname__u__doc__uNoneu__init__uFalseu_new_handleuacceptustaticmethodu_finalize_pipe_listener(u
__locals__((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuPipeListenerxs
uPipeListenercCs�t�}x�yKtj|d�tj|tjtjBdtjtjtjtj�}WnRt	k
r�}z2|j
tjtjfks�t
|�r��nWYdd}~XqXPq�tj|tjdd�t|�S(uU
        Return a connection object connected to the pipe given by `address`
        i�iN(u
_init_timeoutu_winapiu
WaitNamedPipeu
CreateFileuGENERIC_READu
GENERIC_WRITEuNULLu
OPEN_EXISTINGuFILE_FLAG_OVERLAPPEDuWindowsErroruwinerroruERROR_SEM_TIMEOUTuERROR_PIPE_BUSYu_check_timeoutuSetNamedPipeHandleStateuPIPE_READMODE_MESSAGEuNoneuPipeConnection(uaddressutuhue((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
PipeClient�s"	u
PipeClientis#CHALLENGE#s	#WELCOME#s	#FAILURE#cCs�ddl}t|t�s!t�tjt�}|jt|�|j	||�j
�}|jd�}||kr�|jt�n|jt
�td��dS(Niiudigest received was wrong(uhmacu
isinstanceubytesuAssertionErroruosuurandomuMESSAGE_LENGTHu
send_bytesu	CHALLENGEunewudigestu
recv_bytesuWELCOMEuFAILUREuAuthenticationError(u
connectionuauthkeyuhmacumessageudigesturesponse((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyudeliver_challenge�s
udeliver_challengecCs�ddl}t|t�s!t�|jd�}|dtt��tks\td|��|tt�d�}|j||�j�}|j	|�|jd�}|t
kr�td��ndS(Niiumessage = %rudigest sent was rejected(uhmacu
isinstanceubytesuAssertionErroru
recv_bytesulenu	CHALLENGEunewudigestu
send_bytesuWELCOMEuAuthenticationError(u
connectionuauthkeyuhmacumessageudigesturesponse((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuanswer_challenge�s,
uanswer_challengecBs8|EeZdZdd�Zdd�Zdd�ZdS(uConnectionWrappercCsO||_||_||_x-dD]%}t||�}t|||�q"WdS(Nufilenoucloseupollu
recv_bytesu
send_bytes(ufilenoucloseupollu
recv_bytesu
send_bytes(u_connu_dumpsu_loadsugetattrusetattr(uselfuconnudumpsuloadsuattruobj((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__init__�s			
uConnectionWrapper.__init__cCs#|j|�}|jj|�dS(N(u_dumpsu_connu
send_bytes(uselfuobjus((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyusend�suConnectionWrapper.sendcCs|jj�}|j|�S(N(u_connu
recv_bytesu_loads(uselfus((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyurecv�suConnectionWrapper.recvN(u__name__u
__module__u__qualname__u__init__usendurecv(u
__locals__((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuConnectionWrapper�suConnectionWrappercCs%tj|fdddd�jd�S(Niuutf-8(u	xmlrpclibudumpsuNoneuencode(uobj((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
_xml_dumpssu
_xml_dumpscCs%tj|jd��\\}}|S(Nuutf-8(u	xmlrpclibuloadsudecode(usuobjumethod((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
_xml_loadss!u
_xml_loadscBs |EeZdZdd�ZdS(uXmlListenercCs.ddljatj|�}t|tt�S(Ni(u
xmlrpc.clientuclientu	xmlrpclibuListeneruacceptuConnectionWrapperu
_xml_dumpsu
_xml_loads(uselfuobj((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuaccept	suXmlListener.acceptN(u__name__u
__module__u__qualname__uaccept(u
__locals__((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuXmlListenersuXmlListenercOs(ddljatt||�tt�S(Ni(u
xmlrpc.clientuclientu	xmlrpclibuConnectionWrapperuClientu
_xml_dumpsu
_xml_loads(uargsukwds((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu	XmlClientsu	XmlClientcCs�t|�}g}x�|r�tj|d|�}|tkr@Pnrt|koatt|�knrs|t8}n?t|ko�tt|�knr�|t8}ntd��|j	||�||dd�}d}qW|S(NuShould not get hereiiF(
ulistu_winapiuWaitForMultipleObjectsuFalseuWAIT_TIMEOUTu
WAIT_OBJECT_0ulenuWAIT_ABANDONED_0uRuntimeErroruappend(uhandlesutimeoutuLureadyures((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_exhaustive_waits	&
&

u_exhaustive_waitc
 s�|dkrt}n)|dkr*d}nt|dd�}t|�}i�g}t��t�}zx�|D]�}yt|d�}Wn"tk
r�|�|j�<YqrXy"tj	|�dd�\}}Wn@tk
r}z |j}|t
kr�nWYdd}~XnX|tjkrA|j|�|�|j<qr�j|�d}qrWt�j�|�}Wdx|D]}|j�qxWx�|D]�}y|jd�\}	}Wn@tk
r�}z |j}|t
kr��nWYdd}~XnX|tjkr��|j}�j|�|dkrKt|d�rHd|_qHqKq�q�WX�j�fdd�|D���fd	d
�|D�S(u�
        Wait till an object in object_list is ready/readable.

        Returns list of those objects in object_list which are ready/readable.
        ii�g�?ufilenoNu_got_empty_messagec3s|]}�|VqdS(N((u.0uh(uwaithandle_to_obj(u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu	<genexpr>rsuwait.<locals>.<genexpr>cs"g|]}|�kr|�qS(((u.0uo(u
ready_objects(u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu
<listcomp>ss	uwait.<locals>.<listcomp>T(uNoneuINFINITEuintulistusetugetattruAttributeErroru	__index__u_winapiuReadFileuTrueuOSErroruwinerroru
_ready_errorsuERROR_IO_PENDINGuappendueventuaddu_exhaustive_waitukeysucanceluGetOverlappedResultuERROR_OPERATION_ABORTEDuhasattru_got_empty_messageuupdate(
uobject_listutimeoutuov_listu
ready_handlesuoufilenouovuerrueu_((u
ready_objectsuwaithandle_to_obju?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuwait0sZ				

"	




	

 upollcCs�|dk	rt|d�}ni}tj�}xM|D]E}|j|tj�t|d�rs|||j�<q8|||<q8Wg}xN|j|�D]=\}}|tj@r�t	d|��n|j
||�q�W|S(Ni�ufilenouinvalid file descriptor %i(uNoneuintuselectupolluregisteruPOLLINuhasattrufilenouPOLLNVALu
ValueErroruappend(ufdsutimeoutufd_mapupollsterufdulsuevent((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_pollxs

u_pollcCstj|gg|�dS(Ni(uselect(ufdsutimeout((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu_poll�scCs�|dk	r8|dkr%t|d�Stj�|}nxsyt||�SWn=tk
r�}z|jtjkry�nWYdd}~XnX|dk	r;|tj�}q;q;dS(u�
        Wait till an object in object_list is ready/readable.

        Returns list of those objects in object_list which are ready/readable.
        iN(uNoneu_pollutimeuOSErroruerrnouEINTR(uobject_listutimeoutudeadlineue((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuwait�s
i(u	reductionT(Nu__all__uiouosusysupickleuselectusocketustructuerrnoutimeutempfileu	itertoolsu_multiprocessingumultiprocessingucurrent_processuAuthenticationErroruBufferTooShortumultiprocessing.utiluget_temp_diruFinalizeu	sub_debugudebugumultiprocessing.forkinguForkingPickleru_winapiu
WAIT_OBJECT_0uWAIT_TIMEOUTuINFINITEuImportErroruplatformuNoneuBUFSIZEuCONNECTION_TIMEOUTucountu
_mmap_counterudefault_familyufamiliesuhasattru
_init_timeoutu_check_timeoutuarbitrary_addressu_validate_familyuaddress_typeu_ConnectionBaseuPipeConnectionu
ConnectionuobjectuListeneruClientuTrueuPipeuSocketListeneruSocketClientuPipeListeneru
PipeClientuMESSAGE_LENGTHu	CHALLENGEuWELCOMEuFAILUREudeliver_challengeuanswer_challengeuConnectionWrapperu
_xml_dumpsu
_xml_loadsuXmlListeneru	XmlClientu_exhaustive_waituERROR_BROKEN_PIPEuERROR_NETNAME_DELETEDu
_ready_errorsuwaitu_polluu	reductionuregisteru
reduce_socketureduce_connectionureduce_pipe_connection(((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu<module>
s�" 
	�PS7*-8
	G