Skip to content

Commit 807610b

Browse files
authored
Merge pull request #229 from takluyver/wrapperkernel-eg
Link to complete echo_kernel example repo
2 parents 7ade9f3 + 74cba2b commit 807610b

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

docs/wrapperkernels.rst

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ following methods and attributes:
3636
This should contain the key ``mimetype`` with the mimetype of code in the
3737
target language (e.g. ``'text/x-python'``), the ``name`` of the language
3838
being implemented (e.g. ``'python'``), and ``file_extension`` (e.g.
39-
``'py'``).
39+
``'.py'``).
4040
It may also contain keys ``codemirror_mode`` and ``pygments_lexer`` if they
4141
need to differ from :attr:`language`.
4242

@@ -72,6 +72,11 @@ Now create a `JSON kernel spec file <https://jupyter-client.readthedocs.io/en/la
7272
Example
7373
-------
7474

75+
.. seealso::
76+
77+
`echo_kernel <https://github.com/jupyter/echo_kernel>`__
78+
A packaged, installable version of the condensed example below.
79+
7580
``echokernel.py`` will simply echo any input it's given to stdout::
7681

7782
from ipykernel.kernelbase import Kernel
@@ -81,7 +86,11 @@ Example
8186
implementation_version = '1.0'
8287
language = 'no-op'
8388
language_version = '0.1'
84-
language_info = {'mimetype': 'text/plain'}
89+
language_info = {
90+
'name': 'Any text',
91+
'mimetype': 'text/plain',
92+
'file_extension': '.txt',
93+
}
8594
banner = "Echo kernel - as useful as a parrot"
8695

8796
def do_execute(self, code, silent, store_history=True, user_expressions=None,

0 commit comments

Comments
 (0)