Your IP : 216.73.216.213


Current Path : /opt/alt/python35/lib64/python3.5/site-packages/numpy/compat/__pycache__/
Upload File :
Current File : //opt/alt/python35/lib64/python3.5/site-packages/numpy/compat/__pycache__/py3k.cpython-35.pyc



(��^5�@sdZddlmZmZmZddddddd	d
ddd
dddddddgZddlZyddlmZWne	k
r�dZYnXej
ddkr-ddlZeZ
efZeZeZeZdd	�Zdd�Zdd�Zdd�Zddd
�Zdd�ZdZnieZe
Z
eZeZee
fZeZeZd Zd!d�Zd"d	�Zdd#d
�Zd$d�Zd%d�Zd&d
�Zd'd�Zd(d�Zej
ddkr�ej
d)d*kr�dd+d�Zndd,d�ZdS)-z 
Python 3 compatibility tools.

�)�division�absolute_import�print_function�bytes�asbytes�	isfileobj�getexception�strchar�unicode�	asunicode�asbytes_nested�asunicode_nested�asstr�open_latin1�long�
basestring�sixu�
integer_types�is_pathlib_path�npy_load_module�PathN)r�cCs&t|t�r|jd�St|�S)N�latin1)�
isinstancer�decode�str)�s�r�D/opt/alt/python35/lib64/python3.5/site-packages/numpy/compat/py3k.pyrs
cCs&t|t�r|St|�jd�S)Nr)rrr�encode)rrrrr scCs&t|t�r|jd�St|�S)Nr)rrrr)rrrrr%s
cCst|tjtjtjf�S)N)r�io�FileIO�BufferedReader�BufferedWriter)�frrrr*s�rcCst|d|dd�S)N�mode�encodingz
iso-8859-1)�open)�filenamer&rrrr-scCs|S)Nr)rrrrr0s�U�ScCs
t|t�S)N)r�file)r$rrrr@scCs&t|t�r|St|�jd�S)N�ascii)rr
rr)rrrrrCscCst|d|�S)Nr&)r()r)r&rrrrHscCs
t|d�S)NZunicode_escape)r
)rrrrrKscCstj�dS)N�)�sys�exc_inforrrrrOscCsDt|d�r6t|ttf�r6dd�|D�St|�SdS)N�__iter__cSsg|]}t|��qSr)r)�.0�yrrr�
<listcomp>Ts	z"asbytes_nested.<locals>.<listcomp>)�hasattrrrr
r)�xrrrrRs%cCsDt|d�r6t|ttf�r6dd�|D�St|�SdS)Nr1cSsg|]}t|��qSr)r
)r2r3rrrr4Zs	z$asunicode_nested.<locals>.<listcomp>)r5rrr
r)r6rrrr
Xs%cCstdk	ot|t�S)z5
    Check whether obj is a pathlib.Path object.
    N)rr)�objrrrr^sr.�cCs%ddl}|jj||�j�S)ad
        Load a module.

        .. versionadded:: 1.11.2

        Parameters
        ----------
        name : str
            Full module name.
        fn : str
            Path to module file.
        info : tuple, optional
            Only here for backward compatibility with Python 2.*.

        Returns
        -------
        mod : module

        rN)�importlib.machinery�	machinery�SourceFileLoader�load_module)�name�fn�info�	importlibrrrrescCs�ddl}ddl}|dkrW|jj|�}|j||g�\}}}nt||d�}z|j||||�}Wd|j�X|S)a}
        Load a module.

        .. versionadded:: 1.11.2

        Parameters
        ----------
        name : str
            Full module name.
        fn : str
            Path to module file.
        info : tuple, optional
            Information as returned by `imp.find_module`
            (suffix, mode, type).

        Returns
        -------
        mod : module

        rNr.)�imp�os�path�dirname�find_moduler(r<�close)r=r>r?rArBrC�fo�modrrrr|s!)�__doc__�
__future__rrr�__all__r/�pathlibr�ImportError�version_infor �intrrrrr
rrrrrrrr	rrr
rrrrrr�<module>sV
		&