Skip to main content

IPython kernels for teaching and learning C/C++ in a Jupyter notebook, providing C/C++ syntax highlighting and a little more magic.

Project description

c-kernel

IPython kernels for teaching and learning C/C++ in a Jupyter notebook, providing C/C++ syntax highlighting, automatic compilation and a little more magic.

AsyncKernel

This kernel (an extension of the default IPython kernel) provides the ability to execute shell commands embedded in comments when the cell contents are saved using the %%file cell magic:

AutoCompileKernel

Automatically compile cells into object files or executables using the name given on the cell's first line:

Specify options in comments using //%:

Compose simple multi-file projects in a single notebook:

Installation

To install from git:

git clone git@github.com:adamtuft/c-kernel.git
python3 -m pip install ./c-kernel

Then, install the kernel(s), giving it a name and a display name of your choice. For example, to install AutoCompileKernel using clang and clang++ as the default compilers, run:

ckernel install AutoCompileKernel autocompile-clang "Auto-compile C/C++ (clang)" --user --cc clang --cxx clang++

This kernel will then be available under the name "Auto-compile C/C++ (clang)" in Jupyter:

See ckernel install --help for all options.

License

Licensed under the BSD 3-Clause License (see the license file).

Copyright (c) 2023, Adam Tuft

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

ckernel-0.1.1.tar.gz (10.3 kB view hashes)

Uploaded Source

Built Distribution

ckernel-0.1.1-py3-none-any.whl (11.3 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