Version 2 of tcljupyter

Updated 2020-06-10 12:33:45 by MJ

tcljupyter is a kernel in Tcl only for use with Jupyter Notebooks

Installation

Manually copy to a Jupyter data location jupyter --paths.

Then change the paths in kernel.json to match your machine.

Dependencies

The tcl used to run the init.tcl script should have the following available:

Supported

Most web client commands are supported. Only thing missing is reading from stdin with for example gets. Also interrupting the kernel will display the interruption message under the currently active cell (not the interrupted one).

Commands

  • jupyter::display mimetype body: Display body in the cell. Returns the display id for use in updatedisplay.
  • jupyter::html body: Display body as html in the cell. Returns the display id for use in updatedisplay.
  • jupyter::updatedisplay id mimetype body: Updates the display with id id with then new body.
  • jupyter::updatehtml id body: Updates the html display with id id with then new body.

If a cell ends with ; the last result is not displayed.

Design

[L1 ]

For communication from kernel to session thread thread::send -async is being used. stdout and stderr are being intercepted by chan push