kernel

IPythonKernel based on pystata

The latest documentation for implementing a wrapper kernel is here, but the current code deviates from those instructions (which call for inheriting from kernelbase.Kernel), instead inheriting from the IPython kernel implementation, IPythonKernel.

For a diagram of the main dependencies among the principal nbstata modules, click here.


source

PyStataKernel

 PyStataKernel (**kwargs)

A jupyter kernel based on pystata

Config and Stata initialization

Stata is initialized during the execution of the first cell (in PyStataKernel.do_execute below) so that any configuration errors can be displayed in the notebook.


source

PyStataKernel.init_session

 PyStataKernel.init_session ()

Stata code cell execution (and error display)


source

PyStataKernel.post_do_hook

 PyStataKernel.post_do_hook ()

source

PyStataKernel.do_execute

 PyStataKernel.do_execute (code, silent, store_history=True,
                           user_expressions=None, allow_stdin=False)

Execute Stata code cell

Other kernel capabilities


source

PyStataKernel.do_inspect

 PyStataKernel.do_inspect (code, cursor_pos, detail_level=0,
                           omit_sections=())

Display Stata ‘describe’ output (regardless of cursor position)


source

PyStataKernel.do_complete

 PyStataKernel.do_complete (code, cursor_pos)

Provide context-aware tab-autocomplete suggestions


source

PyStataKernel.do_is_complete

 PyStataKernel.do_is_complete (code)

Overrides IPythonKernel with kernelbase default


source

PyStataKernel.do_history

 PyStataKernel.do_history (hist_access_type, output, raw, session=None,
                           start=None, stop=None, n=None, pattern=None,
                           unique=False)

Overrides IPythonKernel with kernelbase default