Format: application/x-python-code
1 o
2
3 ��h� � @ s� d Z ddlZejdk red��ddlmZ ddlmZ ddlm Z dd l
4 mZ dd
5 lm
6 Z
7 ddlmZ ddlmZ g d
8 �Zdejejf ZejZejZejZddhZddd�Zddd�Zddd�ZdS )zW
9 IPython: tools for interactive and parallel computing in Python.
10
11 https://ipython.org
12 � N)� �
13 aR
14 IPython 8.19+ supports Python 3.10 and above, following SPEC0.
15 IPython 8.13+ supports Python 3.9 and above, following NEP 29.
16 IPython 8.0-8.12 supports Python 3.8 and above, following NEP 29.
17 When using Python 2.7, please install IPython 5.x LTS Long Term Support version.
18 Python 3.3 and 3.4 were supported up to IPython 6.x.
19 Python 3.5 was supported with IPython 7.0 to 7.9.
20 Python 3.6 was supported with IPython up to 7.16.
21 Python 3.7 was still supported with the 7.x branch.
22
23 See IPython `README.rst` file for more information:
24
25 https://github.com/ipython/ipython/blob/main/README.rst
26
27 � )�get_ipython)�release)�Application)�embed)�InteractiveShell)�sys_info)�extract_module_locals)�
28 start_ipythonr �start_kernel�embed_kernelz%s <%s>zCVE-2022-21699zCVE-2023-24816c K sR t d�\}}| du r|} |du rtdi |��}ddlm} |d| |d�|�� dS )aZ Embed and start an IPython kernel in a given scope.
29
30 If you don't want the kernel to initialize the namespace
31 from the scope of the surrounding function,
32 and/or you want to load full IPython configuration,
33 you probably want `IPython.start_kernel()` instead.
34
35 Parameters
36 ----------
37 module : types.ModuleType, optional
38 The module to load into IPython globals (default: caller)
39 local_ns : dict, optional
40 The namespace to load into IPython user namespace (default: caller)
41 **kwargs : various, optional
42 Further keyword args are relayed to the IPKernelApp constructor,
43 such as `config`, a traitlets :class:`Config` object (see :ref:`configure_start_ipython`),
44 allowing configuration of the kernel. Will only have an effect
45 on the first embed_kernel call for a given process.
46 r Nr )r )�module�local_ns� )r �dictZipykernel.embedr )r r �kwargsZ
47 caller_moduleZ
48 caller_localsZreal_embed_kernelr r �Fc:\Users\shubh\Videos\agent\nova\Lib\site-packages\IPython/__init__.pyr I s r c K s ddl m} |dd| i|��S )aI Launch a normal IPython instance (as opposed to embedded)
49
50 `IPython.embed()` puts a shell in a particular calling scope,
51 such as a function or method for debugging purposes,
52 which is often not desirable.
53
54 `start_ipython()` does full, regular IPython initialization,
55 including loading startup files, configuration, etc.
56 much of which is skipped by `embed()`.
57
58 This is a public API method, and will survive implementation changes.
59
60 Parameters
61 ----------
62 argv : list or None, optional
63 If unspecified or None, IPython will parse command-line options from sys.argv.
64 To prevent any command-line parsing, pass an empty list: `argv=[]`.
65 user_ns : dict, optional
66 specify this dictionary to initialize the IPython user namespace with particular values.
67 **kwargs : various, optional
68 Any other kwargs will be passed to the Application constructor,
69 such as `config`, a traitlets :class:`Config` object (see :ref:`configure_start_ipython`),
70 allowing configuration of the instance (see :ref:`terminal_options`).
71 r ��launch_new_instance�argvNr )ZIPython.terminal.ipappr )r r r r r r r h s r c K s6 ddl }|jdtdd� ddlm} |dd| i|��S ) a� Launch a normal IPython kernel instance (as opposed to embedded)
72
73 `IPython.embed_kernel()` puts a shell in a particular calling scope,
74 such as a function or method for debugging purposes,
75 which is often not desirable.
76
77 `start_kernel()` does full, regular IPython initialization,
78 including loading startup files, configuration, etc.
79 much of which is skipped by `embed_kernel()`.
80
81 Parameters
82 ----------
83 argv : list or None, optional
84 If unspecified or None, IPython will parse command-line options from sys.argv.
85 To prevent any command-line parsing, pass an empty list: `argv=[]`.
86 user_ns : dict, optional
87 specify this dictionary to initialize the IPython user namespace with particular values.
88 **kwargs : various, optional
89 Any other kwargs will be passed to the Application constructor,
90 such as `config`, a traitlets :class:`Config` object (see :ref:`configure_start_ipython`),
91 allowing configuration of the kernel.
92 r Nz`start_kernel is deprecated since IPython 8.0, use from `ipykernel.kernelapp.launch_new_instance`� )�
93 stacklevelr r r )�warnings�warn�DeprecationWarningZipykernel.kernelappr )r r r r r r r r
94 � s �r
95 )NN)N)�__doc__�sys�version_info�ImportErrorZcore.getipythonr �corer Zcore.applicationr Zterminal.embedr Zcore.interactiveshellr Z
96 utils.sysinfor
97 Zutils.framer �__all__�authorZauthor_email�
98 __author__�license�__license__�version�__version__Z__patched_cves__r r r
99 r r r r �<module> s,
100 �
101
102