How to use the ipykernel.kernelapp.IPKernelApp.launch_instance function in ipykernel

To help you get started, we’ve selected a few ipykernel examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github google / swift-jupyter / swift_kernel.py View on Github external
'matches': insertable_matches,
            'cursor_start': cursor_pos - len(prefix),
            'cursor_end': cursor_pos,
        }

if __name__ == '__main__':
    # Jupyter sends us SIGINT when the user requests execution interruption.
    # Here, we block all threads from receiving the SIGINT, so that we can
    # handle it in a specific handler thread.
    if hasattr(signal, 'pthread_sigmask'): # Not supported in Windows
        signal.pthread_sigmask(signal.SIG_BLOCK, [signal.SIGINT])

    from ipykernel.kernelapp import IPKernelApp
    # We pass the kernel name as a command-line arg, since Jupyter gives those
    # highest priority (in particular overriding any system-wide config).
    IPKernelApp.launch_instance(
        argv=sys.argv + ['--IPKernelApp.kernel_class=__main__.SwiftKernel'])
github laixintao / jupyter-dot-kernel / dot_kernel / __main__.py View on Github external
from .kernel import DotKernel
from ipykernel.kernelapp import IPKernelApp

IPKernelApp.launch_instance(kernel_class=DotKernel)
github root-project / root / bindings / jupyroot / python / JupyROOT / kernel / rootkernel.py View on Github external
def main():
    """launch a root kernel"""
    try:
        from ipykernel.kernelapp import IPKernelApp
    except ImportError:
        from IPython.kernel.zmq.kernelapp import IPKernelApp
    IPKernelApp.launch_instance(kernel_class=ROOTKernel)
github TDAbboud / mpkernel / unix / __main__.py View on Github external
""" Launch MPKernelUnix """
from ipykernel.kernelapp import IPKernelApp
from .unix import MPKernelUnix

# Launch the unix port
IPKernelApp.launch_instance(kernel_class=MPKernelUnix)
github willingc / circuitpython_kernel / circuitpython_kernel / __main__.py View on Github external
"""Kernel Launcher"""
import logging

from ipykernel.kernelapp import IPKernelApp
from .kernel import CircuitPyKernel

logging.basicConfig(level=logging.DEBUG)

IPKernelApp.launch_instance(kernel_class=CircuitPyKernel)
github jupyter-incubator / sparkmagic / sparkmagic / sparkmagic / kernels / pyspark3kernel / pyspark3kernel.py View on Github external
language_info = {
            'name': 'pyspark',
            'mimetype': 'text/x-python',
            'codemirror_mode': {'name': 'python', 'version': 3},
            'pygments_lexer': 'python3'
        }

        session_language = LANG_PYTHON

        super(PySpark3Kernel, self).__init__(implementation, implementation_version, language, language_version,
                                             language_info, session_language, **kwargs)


if __name__ == '__main__':
    from ipykernel.kernelapp import IPKernelApp
    IPKernelApp.launch_instance(kernel_class=PySpark3Kernel)
github evhub / coconut / coconut / icoconut / __main__.py View on Github external
def main():
    """Launch the kernel app."""
    IPKernelApp.launch_instance(kernel_class=CoconutKernel)