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 May 28, 2019
1 parent 71e0bb7 commit 85c8c73
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 @@ -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",
]
},
{
Expand Down

0 comments on commit 85c8c73

Please sign in to comment.