Jupyter Kernel (xonsh.jupyter_kernel)

Hooks for Jupyter Xonsh Kernel.

class xonsh.jupyter_kernel.XonshKernel(debug_level=0, session_id=None, config=None, **kwargs)[source]

Xonsh xernal for Jupyter

Parameters:
debug_level : int, optional

Integer from 0 (no debugging) to 3 (all debugging), default: 0.

session_id : str or None, optional

Unique string id representing the kernel session. If None, this will be replaced with a random UUID.

config : dict or None, optional

Configuration dictionary to start server with. BY default will search the command line for options (if given) or use default configuration.

control_handler(wire_message)[source]

Handles control requests

deserialize_wire_message(wire_message)[source]

Split the routing prefix and message frames from a message on the wire

do_complete(code, pos)[source]

Get completions.

do_execute(code='', silent=False, store_history=True, user_expressions=None, allow_stdin=False, parent_header=None, **kwargs)[source]

Execute user code.

dprint(level, *args, **kwargs)[source]

Print but with debug information.

handle_complete_request(message, identities)[source]

Handles kernel info requests.

handle_execute_request(message, identities)[source]

Handle execute request messages.

handle_kernel_info_request(message, identities)[source]

Handles kernel info requests.

heartbeat_loop()[source]

Run heartbeat

iopub_handler(message)[source]

Handles iopub requests.

make_default_config()[source]

Provides default configuration

new_header(message_type)[source]

Make a new header

run_thread(loop, name)[source]

Run main thread

send(stream, message_type, content=None, parent_header=None, metadata=None, identities=None)[source]

Send data to the client via a stream

shell_handler(message)[source]

Dispatch shell messages to their handlers

shutdown()[source]

Shutsdown the kernel

sign(messages)[source]

Sign a message list with a secure signature.

start()[source]

Starts the server

stdin_handler(message)[source]
banner = 'Xonsh - Python-powered, cross-platform shell'
implementation = 'Xonsh 0.7.5'
implementation_version = '0.7.5'
language = 'xonsh'
language_info = {'codemirror_mode': 'shell', 'file_extension': '.xsh', 'mimetype': 'text/x-sh', 'name': 'xonsh', 'pygments_lexer': 'xonsh', 'version': '0.7.5'}
language_version = ['0', '7', '5']
parser
signature_schemes = {'hmac-sha256': <built-in function openssl_sha256>}
xonsh.jupyter_kernel.bind(socket, connection, port)[source]

Binds a socket to a port, or a random port if needed. Returns the port.

xonsh.jupyter_kernel.dump_bytes(*args, **kwargs)[source]

Converts an object to JSON and returns the bytes.

xonsh.jupyter_kernel.load_bytes(b)[source]

Converts bytes of JSON to an object.