[IPython-dev] Is it possible to have a non-executable code cell?

Andrea Zonca zonca at sdsc.edu
Wed Jun 25 14:32:34 EDT 2014


Hi,
you can use a markdown cell for that purpose:

```python
import numpy as np
a = np.arange(3)
```
cheers,
Andrea


On Wed, Jun 25, 2014 at 11:26 AM, Paul Moore <p.f.moore at gmail.com> wrote:
> Hi. I have a notebook I'm writing that gets data from an external
> source using lupa (Lua-Python interface). However, the place I'll be
> hosting my notebook doesn't have lupa installed. So what I want to do
> is to have a code cell that contains the code I use offline to
> generate the data, for documentation purposes. I would like that cell
> to be highlighted as with any other Python code, but *not* be
> executed. Then below that I can add a cell that gets the data from a
> static copy hosted on the web (with a note explaining what's going on,
> and why). The rest of the notebook can then manipulate the data as
> normal.
>
> The problem is that I don't know of a way to mark a code cell as
> "don't execute this". Is that possible?
>
> Thanks,
> Paul
> _______________________________________________
> IPython-dev mailing list
> IPython-dev at scipy.org
> http://mail.scipy.org/mailman/listinfo/ipython-dev



More information about the IPython-dev mailing list