##// END OF EJS Templates
docs: document embed() under IPython...
Philippe Blain -
Show More
@@ -56,6 +56,8 b' from .core.interactiveshell import InteractiveShell'
56 from .utils.sysinfo import sys_info
56 from .utils.sysinfo import sys_info
57 from .utils.frame import extract_module_locals
57 from .utils.frame import extract_module_locals
58
58
59 __all__ = ["start_ipython", "embed", "start_kernel", "embed_kernel"]
60
59 # Release data
61 # Release data
60 __author__ = '%s <%s>' % (release.author, release.author_email)
62 __author__ = '%s <%s>' % (release.author, release.author_email)
61 __license__ = release.license
63 __license__ = release.license
@@ -350,7 +350,7 b' class InteractiveShellEmbed(TerminalInteractiveShell):'
350 def embed(*, header="", compile_flags=None, **kwargs):
350 def embed(*, header="", compile_flags=None, **kwargs):
351 """Call this to embed IPython at the current point in your program.
351 """Call this to embed IPython at the current point in your program.
352
352
353 The first invocation of this will create an :class:`InteractiveShellEmbed`
353 The first invocation of this will create a :class:`terminal.embed.InteractiveShellEmbed`
354 instance and then call it. Consecutive calls just call the already
354 instance and then call it. Consecutive calls just call the already
355 created instance.
355 created instance.
356
356
@@ -375,10 +375,10 b' def embed(*, header="", compile_flags=None, **kwargs):'
375 header : str
375 header : str
376 Optional header string to print at startup.
376 Optional header string to print at startup.
377 compile_flags
377 compile_flags
378 Passed to the `compile_flags` parameter of :py:meth:`InteractiveShellEmbed.mainloop()`,
378 Passed to the `compile_flags` parameter of :py:meth:`terminal.embed.InteractiveShellEmbed.mainloop()`,
379 which is called when the :class:`InteractiveShellEmbed` instance is called.
379 which is called when the :class:`terminal.embed.InteractiveShellEmbed` instance is called.
380 **kwargs : various, optional
380 **kwargs : various, optional
381 Any other kwargs will be passed to the :class:`InteractiveShellEmbed` constructor.
381 Any other kwargs will be passed to the :class:`terminal.embed.InteractiveShellEmbed` constructor.
382 Full customization can be done by passing a traitlets :class:`Config` in as the
382 Full customization can be done by passing a traitlets :class:`Config` in as the
383 `config` argument (see :ref:`configure_start_ipython` and :ref:`terminal_options`).
383 `config` argument (see :ref:`configure_start_ipython` and :ref:`terminal_options`).
384 """
384 """
@@ -66,10 +66,13 b" if __name__ == '__main__':"
66 # them as part of the public API. They must have __all__ defined. The
66 # them as part of the public API. They must have __all__ defined. The
67 # non-API modules they import from should be excluded by the skip patterns
67 # non-API modules they import from should be excluded by the skip patterns
68 # above.
68 # above.
69 docwriter.names_from__all__.update({
69 docwriter.names_from__all__.update(
70 'IPython.display',
70 {
71 })
71 "IPython",
72
72 "IPython.display",
73 }
74 )
75
73 # Now, generate the outputs
76 # Now, generate the outputs
74 docwriter.write_api_docs(outdir)
77 docwriter.write_api_docs(outdir)
75 # Write index with .txt extension - we can include it, but Sphinx won't try
78 # Write index with .txt extension - we can include it, but Sphinx won't try
General Comments 0
You need to be logged in to leave comments. Login now