a
    ҏi                     @   sb   d dl Z d dlZd dlmZ d dlmZmZ d dlmZ ej	dkZ
e
rJdndZG dd	 d	eZdS )
    N)Path)DictUnion)ChannelOwnernti   i   c                       sB   e Zd Zeeeedd fddZeeef ddddZ	  Z
S )WritableStreamN)parenttypeguidinitializerreturnc                    s   t  |||| d S )N)super__init__)selfr   r	   r
   r   	__class__ Q/home/Claro/venv/lib/python3.9/site-packages/playwright/_impl/_writable_stream.pyr      s    zWritableStream.__init__)pathr   c                    st   t |dD}|t}|sq@| jddt| iI d H  qW d    n1 sT0    Y  | jdI d H  d S )Nrbwritebinaryclose)openreadCOPY_BUFSIZEZ_channelsendbase64	b64encodedecode)r   r   fdatar   r   r   copy!   s    
*zWritableStream.copy)__name__
__module____qualname__r   strr   r   r   r   r"   __classcell__r   r   r   r   r      s   r   )r   ospathlibr   typingr   r   Zplaywright._impl._connectionr   name_WINDOWSr   r   r   r   r   r   <module>   s   
