a
    ]@                     @   s  d Z ddlZg dZejd dkr2ddlZejZneZdd Zze	Z
W n ey\   eZ
Y n0 zeZW n ey|   eZY n0 dd Zd	d
 Zdd ZzeZW n ey   eZY n0 zeZW n ey   eZY n0 zeZW n ey   eZY n0 zeZW n ey   eZY n0 ejdkr*dZnejdkr<dZndZdd Z ze dd Z!dd Z"W n$ ey   dd Z!dd Z"Y n0 ze#Z$W n ey   dd Z$Y n0 zddl%m&Z' W n e(y   e)Z'Y n0 dS )z"Python 2.x/3.x compatibility tools    N)
geterrorlong_xrange_ord_unichr_unicode_
raw_input_as_bytes
as_unicode	file_type   c                   C   s   t  d S )N   )sysexc_info r   r   c/home/tom/ab/renpy-build/tmp/install.linux-x86_64/lib/python3.9/site-packages/pygame_sdl2/compat.pyr      s    r   c                  C   s4   zddl m}  W n ty.   ddlm}  Y n0 | S )Nr   StringIOBytesIO)	cStringIOr   ImportErrorior   r   r   r   r   get_BytesIO   s
    r   c                  C   s4   zddl m}  W n ty.   ddlm}  Y n0 | S )Nr   r   )r   r   r   r   r   r   r   r   get_StringIO$   s
    r   c                 C   s&   z
t | W S  ty    |  Y S 0 d S N)ord	TypeError)or   r   r   r   +   s    
r   win32replace)r   r   r   surrogateescapestrictc                 C   s   |  t tS r   )encoder   getfilesystemencodingfilesystem_errors)ur   r   r   filesystem_encodeL   s    r'   c                 C   s   | S )z* '<binary literal>' => '<binary literal>' r   stringr   r   r   r	   Y   s    r	   c                 C   s   |  ddS )z. r'<Unicode literal>' => u'<Unicode literal>' unicode_escaper"   )decodeZrstringr   r   r   r
   ]   s    r
   c                 C   s   |  ddS )z+ '<binary literal>' => b'<binary literal>' zlatin-1r"   )r#   r(   r   r   r   r	   a   s    c                 C   s   |  ddddS )z- r'<Unicode literal>' => '<Unicode literal>' asciir"   r*   Zstict)r#   r+   r,   r   r   r   r
   e   s    c                 G   s4   z
|   W S  ty.   |r(|d  Y S  Y n0 d S )Nr   )nextStopIteration)iargsr   r   r   next_m   s    
r2   )*__doc__r   __all__version_infor   FileIOr   filer   longr   	NameErrorintZxranger   ranger   r   r   unichrr   chrunicoder   strbytesZbytes_Z	raw_inputr   inputplatformr%   r'   r	   r
   r.   r2   Zitertools.imapimapZimap_r   mapr   r   r   r   <module>   sn   





	