File: //usr/lib64/python3.9/site-packages/ntp/__pycache__/poly.cpython-39.opt-1.pyc
a
\��d � @ s� d Z ddlZdZdZeeu r>eZeZeZ e
ZeZe
Zdd� Zn�ddlZeZdd� ZeZd d
� Z dd� Zd
d� Zdd� Zdd� Zdejj�� kr�dZeej�e_dejj�� kr�dZeej�e_dS )a Handle bytes and strings in a polyglot fashion.
copied from ../ntpclient/ntpq.py which got it from
https://gitlab.com/esr/practical-python-porting/blob/master/polystr-inclusion.py
see http://www.catb.org/esr/faqs/practical-python-porting/ for more information.
� Nzlatin-1Fc C s
| � d�S )zString_escape/unicode_escape.�
string_escape)�decode��s� r �./usr/lib64/python3.9/site-packages/ntp/poly.pyr - s r c C s, t | t�r| S t | t�s t| �S t| td�S )z$Polymorphic string factory function.��encoding)�
isinstance�str�bytes�master_encoding)�or r r �polystr6 s
r c C s, t | t�r| S t | t�s t| �S t| td�S )z%Polymorphic string encoding function.r )r
r r r
r r r r � polybytes@ s
r c C s t | t�rt| �S | S dS )zPolymorphic ord() functionN)r
r �ord��cr r r �polyordH s
r c C s t | t�rt| �S | S dS )zPolymorphic chr() functionN)r
�int�chrr r r r �polychrO s
r c C s | � t��d�S )z)Polymorphic string_escape/unicode_escape.Zunicode_escape)�encoder
r r r r r r V s c C s t j| jdddd�S )z/Standard input/output wrapper factory function.�utf-8�
T)r �newline�line_buffering)�io�
TextIOWrapper�buffer)�streamr r r �make_std_wrapper^ s
�r! r T)�__doc__�sysr
Zforced_utf8r r r ZunicodeZpolyunicoder r r r Z raw_inputZ polyinputr r �inputr! �stdoutr �lower�stderrr r r r �<module> s4