a
    X%bC
                     @   s2  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*g dZng ZdS )    )unicode_literalsN)PY2PY3exec_)Mappingc                 O   s   | |i |S )N )fargskwr   r   b/Users/vegardjervell/Documents/master/model/venv/lib/python3.9/site-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)numberr   r   r   r   %   s    r   )reloadc                 C   s   |du r*t  d }|d j}|d j}n|du r6|}t|tsHtdt|tsZtdt| d}| }W d   n1 s0    Y  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   r   r   r+   r   	raw_inputr   unichrunicodexrange)NN)
__future__r   r   Zfuture.utilsr   r   r   collectionsr   collections.abcr   r   Zpast.builtinsr   r   r   r   sysr   r   inputr,   impr   r.   r-   ranger/   __builtin__r+   __all__r   r   r   r   <module>   sJ   

