o
    >eF                     @   s   d Z dZdd ZdS )z_
Implementation of Unicode Bidirectional Algorithm
http://www.unicode.org/unicode/reports/tr9/
z0.4.2c                  C   s2  ddl } ddl}ddl}ddl}ddl}ddlm} |  }|jddddd	d
d |jddddddd |jddddddd |jddddd	dd |	 \}}|j
r]|j
dvr]|d |jrk|| |j|_|rp|}	n|j}	|	D ]!}
||
|j|j|j
|j}t||js||j}|j|dd qudS )z)Will be used to create the console script    N   )get_displayz-ez
--encodingencodingzutf-8stringzText encoding (default: utf-8))destdefaulttypehelpz-uz--upper-is-rtlupper_is_rtlF
store_truezDTreat upper case chars as strong 'R' for debugging (default: False).)r   r   actionr	   z-dz--debugdebugz/Output to stderr steps taken with the algorithmz-bz
--base-dirbase_dirzOverride base direction [L|R]LRzoption -b can be L or R )end)optparsesyscodecslocalesix	algorithmr   OptionParser
add_option
parse_argsr   errorPY2	getwritergetpreferredencodingstdoutstdinr   r
   r   
isinstance	text_typedecodeprint_)r   r   r   r   r   r   parseroptionsrestlineslinedisplay r+   N/var/www/html/humari/django-venv/lib/python3.10/site-packages/bidi/__init__.pymain   s^   
r-   N)__doc__VERSIONr-   r+   r+   r+   r,   <module>   s   