관리-도구
편집 파일: windows_utils.cpython-310.opt-1.pyc
o 6��f� � @ s� d Z ddlZejdkred��ddlZddlZddlZddlZddlZddl Z ddl Z dZdZej Z ejZe�� Zdded �d d�ZG dd � d �ZG dd� dej�ZdS )z)Various Windows specific bits and pieces.� NZwin32z win32 only)�pipe�Popen�PIPE� PipeHandlei F)TT)�duplex� overlapped�bufsizec C s t jd�t�� tt��d�}| rtj}tj tj B }||}}ntj}tj }d|}}|tjO }|d r8|tj O }|d r@tj }nd}d } } z.t�||tjd||tjtj�} t�||dtjtj|tj�} tj| dd�}|�d� | | fW S | dur�t�| � | dur�t�| � � )zELike os.pipe() but with overlapped support and using handles not fds.z\\.\pipe\python-pipe-{:d}-{:d}-)�prefixr � NT�r )�tempfileZmktemp�format�os�getpid�next� _mmap_counter�_winapiZPIPE_ACCESS_DUPLEXZGENERIC_READZ GENERIC_WRITEZPIPE_ACCESS_INBOUNDZFILE_FLAG_FIRST_PIPE_INSTANCEZFILE_FLAG_OVERLAPPEDZCreateNamedPipeZ PIPE_WAITZNMPWAIT_WAIT_FOREVERZNULLZ CreateFileZ OPEN_EXISTINGZConnectNamedPipeZGetOverlappedResult�CloseHandle)r r r ZaddressZopenmode�accessZobsizeZibsizeZflags_and_attribsZh1Zh2Zov� r �</opt/alt/python310/lib64/python3.10/asyncio/windows_utils.pyr sJ �� �� r c @ sb e Zd ZdZdd� Zdd� Zedd� �Zdd � Ze j d �dd�Zej fd d�Zdd� Zdd� ZdS )r z�Wrapper for an overlapped pipe handle which is vaguely file-object like. The IOCP event loop can use these instead of socket objects. c C s || _ d S �N��_handle��self�handler r r �__init__V s zPipeHandle.__init__c C s2 | j d urd| j ��}nd}d| jj� d|� d�S )Nzhandle=�closed�<� �>)r � __class__�__name__r r r r �__repr__Y s zPipeHandle.__repr__c C s | j S r r �r r r r r ` s zPipeHandle.handlec C s | j d u r td��| j S )NzI/O operation on closed pipe)r � ValueErrorr% r r r �filenod s zPipeHandle.fileno)r c C s"