ó
	Q[c        
   @  s  d  d l  m Z d  d l Z d  d l Z d  d l m Z d  d l m Z m Z e rĻ d  d l	 Z	 d   Z
 d  d l m Z d   Z d   Z d  d	 l m Z d
   Z e Z d  d l m Z e Z e Z e Z no d  d l 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 rVd d d  Z n  e rd d d d d d d d d d g
 Z n g  Z d S(   i’’’’(   t   unicode_literalsN(   t   Mapping(   t   PY3t   exec_c         O  s   |  | |   S(   N(    (   t   ft   argst   kw(    (    s1   lib/python2.7/site-packages/past/builtins/misc.pyt   apply   s    (   t   strc         C  s   t  t |  f   S(   uU   
        Return a byte-string of one character with ordinal i; 0 <= i <= 256
        (   t   oldstrt   bytes(   t   i(    (    s1   lib/python2.7/site-packages/past/builtins/misc.pyt   chr   s    c         C  s   |  | k |  | k  S(   uf   
        cmp(x, y) -> integer

        Return negative if x<y, zero if x==y, positive if x>y.
        (    (   t   xt   y(    (    s1   lib/python2.7/site-packages/past/builtins/misc.pyt   cmp   s    (   t   internc         C  s   d t  j |   d S(   uU   oct(number) -> string

        Return the octal representation of an integer
        u   0i   (   t   builtinst   oct(   t   number(    (    s1   lib/python2.7/site-packages/past/builtins/misc.pyR   !   s    (   t   reloadc         C  sŌ   | d k r9 t j   d } | d j } | d j } n | d k rN | } n  t | t  sl t d   n  t | t  s t d   n  t |  d   } | j	   } Wd QXt
 | |  d  } t | | |  d S(   uļ   
        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.
        i   i    u   globals must be a mappingu   locals must be a mappingu   rbUNu   exec(   t   Nonet   inspectt   stackt	   f_globalst   f_localst
   isinstanceR   t	   TypeErrort   opent   readt   compileR   (   t   filenamet	   myglobalst   mylocalst   caller_framet   fint   sourcet   code(    (    s1   lib/python2.7/site-packages/past/builtins/misc.pyt   execfile=   s    	u   applyu   chru   cmpu   execfileu   internu	   raw_inputu   reloadu   unichru   unicodeu   xrange(   t
   __future__R    t   sysR   t   collectionsR   t   future.utilsR   R   R   R   t   past.builtinsR   R	   R   R   R   R   t   inputt	   raw_inputt   impR   t   unicodet   unichrt   ranget   xranget   __builtin__R&   R   t   __all__(    (    (    s1   lib/python2.7/site-packages/past/builtins/misc.pyt   <module>   sF   																