Simple example kernel for GF
If you haven't installed GF already, get it from the official download website.
For graph visualization GF uses graphviz, so please make sure you have it installed:
sudo apt install graphviz
or under Mac OS X with homebrew:
brew install graphviz
You can either install the kernel from the source repository:
git clone https://github.com/kwarc/gf_kernel cd gf_kernel pip install .
or install it directly from pip:
pip install gf-kernel
Afterwards, install the kernel module with:
python -m gf_kernel.install
You're now ready to go and can start a Jupyter notebook with:
gf_kernel as kernel in your notebook.
The kernel supports all of the GF shell commands.
Output files produced by these commands will be placed into the current directory.
The kernel can also be used to define new grammars, which are immediately imported for usage upon defining. If you would like to have line numbers for editing your code you can use the Juypter shortcut Esc+L to enable them.
In addition to the GF shell commands the kernel supports the following commands:
view: show the graph(s) generated by the specified GF shell command
help: shows the help message
export: saves the specified grammar in the current diretory
clean: removes all
.gfofiles from the current directory
Please refer to the tutorial notebook to see how exactly they are used.
This package requires Python 3.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
|Filename, size||File type||Python version||Upload date||Hashes|
|Filename, size gf_kernel-1.0.0-py3-none-any.whl (28.5 kB)||File type Wheel||Python version py3||Upload date||Hashes View|
|Filename, size gf_kernel-1.0.0.tar.gz (15.5 kB)||File type Source||Python version None||Upload date||Hashes View|
Hashes for gf_kernel-1.0.0-py3-none-any.whl