U
    ,]C
                  
   @   sB  d dl mZ d dlZd dlmZmZmZ er:d dlmZ nd dl	mZ erd dl
Z
d dl	mZ dd Zd dlmZ dd	 Zd
d Zd dlmZ dd ZeZd dlmZ eZeZeZnVd dlZd dlmZ ejZejZejZejZejZejZejZejZejZejZejZerdddZer:dd	ddddddddg
Zng ZdS )    )unicode_literalsN)PY2PY3exec_)Mappingc                 O   s
   | ||S )N )fargskwr   r   4/usr/lib/python3/dist-packages/past/builtins/misc.pyapply   s    r   )strc                 C   s   t t| fS )zU
        Return a byte-string of one character with ordinal i; 0 <= i <= 256
        )oldstrbytes)ir   r   r   chr   s    r   c                 C   s   | |k| |k  S )zf
        cmp(x, y) -> integer

        Return negative if x<y, zero if x==y, positive if x>y.
        r   )xyr   r   r   cmp   s    r   )internc                 C   s   dt | dd  S )zUoct(number) -> string

        Return the octal representation of an integer
        0   N)builtinsoct)Znumberr   r   r   r   %   s    r   )reloadc              	   C   s   |dkr*t  d }|d j}|d j}n|dkr6|}t|tsHtdt|tsZtdt| d}| }W 5 Q R X t	|| d}t
||| dS )z
        Read and execute a Python script from a file in the given namespaces.
        The globals and locals are dictionaries, defaulting to the current
        globals and locals. If only globals is given, locals defaults to it.
        N   r   zglobals must be a mappingzlocals must be a mappingrbexec)inspectstack	f_globalsf_locals
isinstancer   	TypeErroropenreadcompiler   )filenameZ	myglobalsZmylocalsZcaller_frameZfinsourcecoder   r   r   execfileB   s    


r*   r   	raw_inputr   unichrunicodexrange)NN)Z
__future__r   r   Zfuture.utilsr   r   r   collectionsr   Zcollections.abcr   r   Zpast.builtinsr   r   r   r   sysr   r   inputr+   impr   r-   r,   ranger.   Z__builtin__r*   __all__r   r   r   r   <module>   sT   
   