Ñò
ÎÑAHc           @   sL   d  Z  d d k Z d d k l Z d d k l Z d e f d „  ƒ  YZ d S(   s)   Support for interactive macros in IPythoniÿÿÿÿN(   t   Term(   t   IPyAutocallt   Macroc           B   s;   e  Z d  Z d „  Z d „  Z d „  Z d „  Z d „  Z RS(   s×   Simple class to store the value of macros as strings.

    Macro is just a callable that executes a string of IPython
    input when called.
    
    Args to macro are available in _margv list if you need them.
    c         C   s    d i  | ƒ i ƒ  d |  _ d  S(   Nt    s   
(   t   joint   rstript   value(   t   selft   data(    (    sE   /u/d/b/dbachman/web/work/lib/python2.3/site-packages/IPython/macro.pyt   __init__   s    c         C   s   |  i  S(   N(   R   (   R   (    (    sE   /u/d/b/dbachman/web/work/lib/python2.3/site-packages/IPython/macro.pyt   __str__   s    c         C   s   d t  |  i ƒ S(   Ns   IPython.macro.Macro(%s)(   t   reprR   (   R   (    (    sE   /u/d/b/dbachman/web/work/lib/python2.3/site-packages/IPython/macro.pyt   __repr__"   s    c         G   s4   t  i i ƒ  | |  i i d <|  i i |  i ƒ d  S(   Nt   _margv(   R    t   coutt   flusht   _ipt   user_nst   runlinesR   (   R   t   args(    (    sE   /u/d/b/dbachman/web/work/lib/python2.3/site-packages/IPython/macro.pyt   __call__%   s    c         C   s   h |  i  d 6S(   s%    needed for safe pickling via %store R   (   R   (   R   (    (    sE   /u/d/b/dbachman/web/work/lib/python2.3/site-packages/IPython/macro.pyt   __getstate__*   s    (   t   __name__t
   __module__t   __doc__R	   R
   R   R   R   (    (    (    sE   /u/d/b/dbachman/web/work/lib/python2.3/site-packages/IPython/macro.pyR      s   				(   R   t   IPython.ipapit   IPythont   IPython.genutilsR    R   R   (    (    (    sE   /u/d/b/dbachman/web/work/lib/python2.3/site-packages/IPython/macro.pyt   <module>   s   	