Include trace command in Jupyter kernel.

This commit is contained in:
Simon Forman 2021-11-23 11:28:29 -08:00
parent cdf4c94a2b
commit 0c7df6d4cd
2 changed files with 25 additions and 5 deletions

View File

@ -108,20 +108,36 @@
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 6,
"id": "f491e33f",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[1 2 +]"
]
}
],
"source": [
"[1 2 +]"
]
},
{
"cell_type": "code",
"execution_count": null,
"execution_count": 7,
"id": "31d6ec54",
"metadata": {},
"outputs": [],
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"3"
]
}
],
"source": [
"trace"
]

View File

@ -1,7 +1,11 @@
from ipykernel.kernelbase import Kernel
from joy.library import initialize
from joy.library import initialize, inscribe
from joy.joy import run
from joy.utils.stack import stack_to_string
from joy.utils.pretty_print import trace
inscribe(trace)
class JoyKernel(Kernel):