##// END OF EJS Templates
add IPython.start_kernel...
MinRK -
Show More
@@ -61,6 +61,12 b' version_info = release.version_info'
61 61 def embed_kernel(module=None, local_ns=None, **kwargs):
62 62 """Embed and start an IPython kernel in a given scope.
63 63
64 If you don't want the kernel to initialize the namespace
65 from the scope of the surrounding function,
66 and/or you want to load full IPython configuration,
67 you probably want `IPython.start_kernel()` instead.
68
69
64 70 Parameters
65 71 ----------
66 72 module : ModuleType, optional
@@ -112,3 +118,30 b' def start_ipython(argv=None, **kwargs):'
112 118 """
113 119 from IPython.terminal.ipapp import launch_new_instance
114 120 return launch_new_instance(argv=argv, **kwargs)
121
122 def start_kernel(argv=None, **kwargs):
123 """Launch a normal IPython kernel instance (as opposed to embedded)
124
125 `IPython.embed_kernel()` puts a shell in a particular calling scope,
126 such as a function or method for debugging purposes,
127 which is often not desirable.
128
129 `start_kernel()` does full, regular IPython initialization,
130 including loading startup files, configuration, etc.
131 much of which is skipped by `embed()`.
132
133 Parameters
134 ----------
135
136 argv : list or None, optional
137 If unspecified or None, IPython will parse command-line options from sys.argv.
138 To prevent any command-line parsing, pass an empty list: `argv=[]`.
139 user_ns : dict, optional
140 specify this dictionary to initialize the IPython user namespace with particular values.
141 kwargs : various, optional
142 Any other kwargs will be passed to the Application constructor,
143 such as `config`.
144 """
145 from IPython.kernel.zmq.kernelapp import launch_new_instance
146 return launch_new_instance(argv=argv, **kwargs)
147 No newline at end of file
General Comments 0
You need to be logged in to leave comments. Login now