ó
æNXc           @   sL   d  Z  d e f d „  ƒ  YZ d e f d „  ƒ  YZ d e f d „  ƒ  YZ d S(   ss   
Autocall capabilities for IPython.core.

Authors:

* Brian Granger
* Fernando Perez
* Thomas Kluyver

Notes
-----
t   IPyAutocallc           B   s/   e  Z d  Z d Z e Z d d „ Z d „  Z RS(   s¡    Instances of this class are always autocalled
    
    This happens regardless of 'autocall' variable state. Use this to
    develop macro-like mechanisms.
    c         C   s   | |  _  d  S(   N(   t   _ip(   t   selft   ip(    (    sM   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/core/autocall.pyt   __init__'   s    c         C   s   | |  _  d S(   s    Will be used to set _ip point to current ipython instance b/f call
        
        Override this method if you don't want this to happen.
        
        N(   R   (   R   R   (    (    sM   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/core/autocall.pyt   set_ip*   s    N(	   t   __name__t
   __module__t   __doc__t   NoneR   t   Truet   rewriteR   R   (    (    (    sM   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/core/autocall.pyR       s
   t   ExitAutocallc           B   s   e  Z d  Z e Z d „  Z RS(   s   An autocallable object which will be added to the user namespace so that
    exit, exit(), quit or quit() are all valid ways to close the shell.c         C   s   |  j  j ƒ  d  S(   N(   R   t   ask_exit(   R   (    (    sM   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/core/autocall.pyt   __call__8   s    (   R   R   R   t   FalseR   R   (    (    (    sM   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/core/autocall.pyR   3   s   t   ZMQExitAutocallc           B   s   e  Z d  Z e d „ Z RS(   sÝ   Exit IPython. Autocallable, so it needn't be explicitly called.
    
    Parameters
    ----------
    keep_kernel : bool
      If True, leave the kernel alive. Otherwise, tell the kernel to exit too
      (default).
    c         C   s   | |  j  _ |  j  j ƒ  d  S(   N(   R   t   keepkernel_on_exitR   (   R   t   keep_kernel(    (    sM   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/core/autocall.pyR   D   s    (   R   R   R   R   R   (    (    (    sM   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/core/autocall.pyR   ;   s   N(   R   t   objectR    R   R   (    (    (    sM   /data/av2000/mvv/env_mvv/lib/python2.7/site-packages/IPython/core/autocall.pyt   <module>   s   