bundles / IPython 9.15.0.dev / IPython / core / magics / script / ScriptMagics / shebang
function
IPython.core.magics.script:ScriptMagics.shebang
Signature
def shebang(self, line, cell)Summary
[1;34m::
Extended Summary
%[0m[1;35mshebang[0m [[36m--no-raise-error[0m] [[36m--proc [33mPROC[0m] [[36m--bg[0m] [[36m--err [33mERR[0m] [[36m--out [33mOUT[0m]
Run a cell via a shell command
The %%script line is like the #! line of script, specifying a program (bash, perl, ruby, etc.) with which to run.
The rest of the cell is run by that program.
Examples
:: In [1]: %%script bash ...: for i in 1 2 3; do ...: echo $i ...: done 1 2 3 [1;34moptions:[0m --no-raise-error Whether you should raise an error message in addition to a stream on stderr if you get a nonzero exit code. --proc PROC The variable in which to store Popen instance. This is used only when --bg option is given. --bg Whether to run the script in the background. If given, the only way to see the output of the command is with --out/err. --err ERR The variable in which to store stderr from the script. If the script is backgrounded, this will be the stderr *pipe*, instead of the stderr text itself and will not be autoclosed. --out OUT The variable in which to store stdout from the script. If the script is backgrounded, this will be the stdout *pipe*, instead of the stderr text itself and will not be auto closed.Aliases
IPython.core.magics.ScriptMagics.shebang