circuitpython_kernel package¶
Submodules¶
circuitpython_kernel.board module¶
Serial Connection to a Board
-
circuitpython_kernel.board.
connect
()[source]¶ Connect to a pySerial Serial object.
If you do not see the REPL hit enter a few times. Control-A or Home sends you to beginning of line. Control-E or End to the end of the line.
- SAMD21 REPL prompt is >>>
- Press any key will enter REPL
- Ctrl-D does a soft reset.
ESP8266 REPL prompt is >>>
There are four other control commands:
Ctrl-A on a blank line will enter raw REPL mode. This is like a permanent paste mode, except that characters are not echoed back.
Ctrl-B on a blank like goes to normal REPL mode.
Ctrl-C cancels any input, or interrupts the currently running code.
Ctrl-D on a blank line will do a soft reset.
Note that Ctrl-A and Ctrl-D do not work with WebREPL.
Returns: Serial object connected to the microcontroller board Return type: obj
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://circuitpython_kernel.readthedocs.io'}]¶
-
implementation
= 'circuitpython_kernel'¶
-
implementation_version
= '0.3.0.dev'¶
-
language_info
= {'codemirror_mode': {'version': 3, 'name': 'python'}, '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