Skip to main content

a basic wrapper kernel for SWI-Prolog

Project description

SWI-Prolog Kernel for Jupyter

This is a simple wrapper kernel for SWI Prolog.

Quick Start

Binder

Table of Contents

Setup

Using pip

Run pip to install the corresponding package from pypi after Jupyter is already installed.

pip install jupyter-swi-prolog

Register the kernel.

jupyter kernelspec install <path to the site-packages directory>/swi_prolog_kernel

Now start Jupyter the usual way and the kernel should be available.

Using Docker

Execute the following command to pull a and run a prepared image.

docker run -p 8888:8888 troebs/jupyter:swi-prolog

This image can also be used with JupyterHub and the DockerSpawner / SwarmSpawner and probably with the kubespawner. You can also build your own image using the Dockerfile in the repository.

Usage

An example can be found in the repository.

Please note: consult is usually used to read facts and rules from a Prolog source file. To avoid the need for separate files, the magic command %%CONSULT is supported, which replaces this file with the contents of a cell in the Jupyter notebook.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

jupyter-swi-prolog-1.0.2.1.tar.gz (4.1 kB view hashes)

Uploaded Source

Built Distribution

jupyter_swi_prolog-1.0.2.1-py3-none-any.whl (4.7 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page