ž ¨ÿfyuc@sžddddgZddlZddlZddlZddlZddlZddlZddlZddlZddl Z ddl Z ddl Z ddl Z ddl mZmZmZddlmZmZmZmZddlmZy,ddlZdd lmZmZmZWn-ek rKejd krA‚ndZYnXd Zd Z e j!ƒ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 krdHd"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 ƒ‚d S( 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 d d „Z e 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_writables 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.pyureadablesu_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.filenoc Cs1|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„Z dd „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_winapiu CloseHandleu_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 Z n$e j dd„Ze jZ e jZ e dd„Ze dd„Zd d „Zdd d „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_closeisc Csnt|ƒ}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._sendc Cs°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_bytess     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_multiprocessingu closesocketu_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 ed d „ƒZ d d „Z dd„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ÝsuListener.cCs |jjS(N(u _listeneru_last_accepted(uself((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyuÞ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 socketpairu setblockinguTrueu 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 tj Btj Bd||tj tjƒ}tj||dtjtjtjtjƒ}tj|tj ddƒ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_REUSEADDRu setblockinguTrueubindulistenu getsocknameu_addressuOSErrorucloseu_familyuNoneu_last_accepteduFinalizeuunlinku_unlink(uselfuaddressufamilyubacklog((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu__init__?s$     $uSocketListener.__init__c CsUx5y|jjƒ\}|_Wntk r3YqXPq|jdƒt|jƒƒS(NT(u_socketuacceptu_last_accepteduInterruptedErroru setblockinguTrueu 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_typeusocketugetattru setblockinguTrueuconnectu Connectionudetach(uaddressufamilyus((u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu SocketClienths    u SocketClientcBsV|EeZdZdZd dd„Zd dd„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 tj tj ƒ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 |j gdt ƒ}Wn"|jƒtj|ƒ‚YnXWd|jdƒ\}}|dksót‚Xt|ƒS(Niu overlappedTF(u _handle_queueuappendu _new_handleupopu_winapiuConnectNamedPipeuTrueuOSErroruwinerroru ERROR_NO_DATAuWaitForMultipleObjectsueventuFalseuINFINITEucancelu CloseHandleuGetOverlappedResultuAssertionErroruPipeConnection(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_winapiu CloseHandle(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 tj tj 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 ƒ}|j dƒ}||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Át dƒ‚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(u XmlListenercCs.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.pyu XmlListenersu XmlListenercOs(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ƒrsuwait..cs"g|]}|ˆkr|‘qS(((u.0uo(u ready_objects(u?/opt/alt/python33/lib64/python3.3/multiprocessing/connection.pyu ss uwait..T(uNoneuINFINITEuintulistusetugetattruAttributeErroru __index__u_winapiuReadFileuTrueuOSErroruwinerroru _ready_errorsuERROR_IO_PENDINGuappendueventuaddu_exhaustive_waitukeysucanceluGetOverlappedResultuERROR_OPERATION_ABORTEDuhasattru_got_empty_messageuupdate( u object_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ƒ s¤            "         šPS7*- 8     G