From 5485ad1b00136a40c2652199fb279fa1a54a3ef1 Mon Sep 17 00:00:00 2001 From: Roland Haas Date: Sun, 31 Mar 2019 15:26:18 -0500 Subject: [PATCH] CactusTutorial: hack %%bash magic to provide faster feedback see https://github.com/jupyter/notebook/issues/2023 --- CactusTutorial.ipynb | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CactusTutorial.ipynb b/CactusTutorial.ipynb index 755b026..dbd3430 100644 --- a/CactusTutorial.ipynb +++ b/CactusTutorial.ipynb @@ -68,6 +68,10 @@ "source": [ "# this allows you to use \"cd\" in cells to change directories instead of requiring \"%cd\"\n", "%automagic on\n", + "# override IPython's default %%bash to not buffer all output\n", + "from IPython.core.magic import register_cell_magic\n", + "@register_cell_magic\n", + "def bash(line, cell): get_ipython().system(cell)\n", ] }, {