`nbconvert` with the python output format: ipython nbconvert --format="python" currently leaves untouched the IPython magics, which get output to the `.py`. This is a bug, since the output is no longer a valid Python script. Indeed, even trying to run the output from the command line with `ipython` chokes on the magic commands (which is presumably another, separate, bug?) Summary: the magics must be stripped out.