o
    eL                     @   sT   d dl Z ze jjZW n ey   dZY nw edu rdZdd Zdd Zdd ZdS )	    Nasciic              	   C   @   t | trz| tdW S  ttfy   | dd Y S w | S )z=helper to ensure that text passed to WriteConsoleW is unicodereplacer   )
isinstancebytesdecodepyreadline_codepageLookupError	TypeErrortext r   JD:\Projects\ConvertPro\env\Lib\site-packages\pyreadline3/unicode_helper.pyensure_unicode      
r   c              	   C   r   )z0Convert unicode to str using pyreadline_codepager   r   )r   strencoder   r	   r
   r   r   r   r   
ensure_str    r   r   c                 C   s    t | trdd | D S t| S )Nc                 s   s    | ]	}| d dV  qdS )   bigN)to_bytes).0sr   r   r   	<genexpr>,   s
    

zbiter.<locals>.<genexpr>)r   r   iterr   r   r   r   biter*   s
   
r   )sysstdoutencodingr   AttributeErrorr   r   r   r   r   r   r   <module>   s   

