Skip to content

Commit

Permalink
CactusTutorial: hack %%bash magic to provide faster feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
rhaas80 committed Sep 12, 2019
1 parent 4ae9e81 commit 19e993f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CactusTutorial.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,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",
]
},
{
Expand Down

0 comments on commit 19e993f

Please sign in to comment.