B
    Çä˜\‡  ã               @   sè   d Z ddlZddlZejdk r&edƒ‚ej ej ej e	¡d¡¡ ddl
mZ ddlmZ dd	lmZ dd
lmZ ddlmZ ddlmZ ddlmZ ddlmZ dejejf ZejZejZ ejZddd„Z!ddd„Z"ddd„Z#dS )zW
IPython: tools for interactive and parallel computing in Python.

https://ipython.org
é    N)é   é   a(  
IPython 7.0+ supports Python 3.5 and above.
When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
Python 3.3 and 3.4 were supported up to IPython 6.x.

See IPython `README.rst` file for more information:

    https://github.com/ipython/ipython/blob/master/README.rst

Ú
extensionsé   )Úget_ipython)Úrelease)ÚApplication)Úembed)ÚInteractiveShell)Útest)Úsys_info)Úextract_module_localsz%s <%s>c             K   sH   t dƒ\}}| dkr|} |dkr$|}ddlm} |f | |dœ|—Ž dS )a  Embed and start an IPython kernel in a given scope.
    
    If you don't want the kernel to initialize the namespace
    from the scope of the surrounding function,
    and/or you want to load full IPython configuration,
    you probably want `IPython.start_kernel()` instead.
    
    Parameters
    ----------
    module : types.ModuleType, optional
        The module to load into IPython globals (default: caller)
    local_ns : dict, optional
        The namespace to load into IPython user namespace (default: caller)
    
    kwargs : various, optional
        Further keyword args are relayed to the IPKernelApp constructor,
        allowing configuration of the Kernel.  Will only have an effect
        on the first embed_kernel call for a given process.
    r   Nr   )Úembed_kernel)ÚmoduleÚlocal_ns)r   Zipykernel.embedr   )r   r   ÚkwargsZcaller_moduleZcaller_localsZreal_embed_kernel© r   ú/lib/python3.7/site-packages/IPython/__init__.pyr   D   s    r   c             K   s   ddl m} |f d| i|—ŽS )aÅ  Launch a normal IPython instance (as opposed to embedded)
    
    `IPython.embed()` puts a shell in a particular calling scope,
    such as a function or method for debugging purposes,
    which is often not desirable.
    
    `start_ipython()` does full, regular IPython initialization,
    including loading startup files, configuration, etc.
    much of which is skipped by `embed()`.
    
    This is a public API method, and will survive implementation changes.
    
    Parameters
    ----------
    
    argv : list or None, optional
        If unspecified or None, IPython will parse command-line options from sys.argv.
        To prevent any command-line parsing, pass an empty list: `argv=[]`.
    user_ns : dict, optional
        specify this dictionary to initialize the IPython user namespace with particular values.
    kwargs : various, optional
        Any other kwargs will be passed to the Application constructor,
        such as `config`.
    r   )Úlaunch_new_instanceÚargv)ZIPython.terminal.ipappr   )r   r   r   r   r   r   Ústart_ipythonc   s    r   c             K   s   ddl m} |f d| i|—ŽS )aƒ  Launch a normal IPython kernel instance (as opposed to embedded)
    
    `IPython.embed_kernel()` puts a shell in a particular calling scope,
    such as a function or method for debugging purposes,
    which is often not desirable.
    
    `start_kernel()` does full, regular IPython initialization,
    including loading startup files, configuration, etc.
    much of which is skipped by `embed()`.
    
    Parameters
    ----------
    
    argv : list or None, optional
        If unspecified or None, IPython will parse command-line options from sys.argv.
        To prevent any command-line parsing, pass an empty list: `argv=[]`.
    user_ns : dict, optional
        specify this dictionary to initialize the IPython user namespace with particular values.
    kwargs : various, optional
        Any other kwargs will be passed to the Application constructor,
        such as `config`.
    r   )r   r   )ZIPython.kernel.zmq.kernelappr   )r   r   r   r   r   r   Ústart_kernel   s    r   )NN)N)N)$Ú__doc__ÚosÚsysÚversion_infoÚImportErrorÚpathÚappendÚjoinÚdirnameÚ__file__Zcore.getipythonr   Zcorer   Zcore.applicationr   Zterminal.embedr	   Zcore.interactiveshellr
   Ztestingr   Zutils.sysinfor   Zutils.framer   ZauthorZauthor_emailÚ
__author__ÚlicenseZ__license__ÚversionÚ__version__r   r   r   r   r   r   r   Ú<module>   s*   



