circuitpython_kernel package¶
Submodules¶
circuitpython_kernel.board module¶
Serial Connection to a Board
circuitpython_kernel.install module¶
Kernelspec installation.
circuitpython_kernel.kernel module¶
Basic functionality of CircuitPython kernel.
-
class
circuitpython_kernel.kernel.
CircuitPyKernel
(**kwargs)[source]¶ Bases:
ipykernel.kernelbase.Kernel
CircuitPython kernel implementation.
-
do_execute
(code, silent, store_history=True, user_expressions=None, allow_stdin=False)[source]¶ Execute a user’s code cell.
Parameters: - code (str) – Code, one or more lines, to be executed.
- silent (bool) – True, signals kernel to execute code quietly, and output is not displayed.
- store_history (bool) – Whether to record code in history and increase execution count. If silent is True, this is implicitly false.
- user_expressions (dict, optional) – Mapping of names to expressions to evaluate after code is run.
- allow_stdin (bool) – Whether the frontend can provide input on request (e.g. for Python’s raw_input()).
Returns: Execution results.
Return type: dict
-
help_links
= [{'text': 'CircuitPython kernel', 'url': 'https://github.com/adafruit/circuitpython_kernel'}]¶
-
implementation
= 'circuitpython_kernel'¶
-
implementation_version
= '0.3.0.dev'¶
-
classmethod
is_comment
(line)[source]¶ Returns true if the line of code is empty or a comment.
It is much faster to check and skip these lines on the host then to send them to the MCU (with an upload_delay between each one).
-
language_info
= {'codemirror_mode': {'name': 'python', 'version': 3}, 'file_extension': '.py', 'mimetype': 'text/x-python', 'name': 'python', 'pygments_lexer': 'python3', 'version': '3'}¶
-
protocol_version
= '4.5.2'¶
-
circuitpython_kernel.version module¶
CircuitPython Kernel version info
Module contents¶
A Jupyter kernel for CircuitPython