ivanov / ipython-trainingwheels

A beginner student friendly profile for IPython notebook
4 stars 2 forks source link

"preamble" cell that would be auto-executed on notebook load #36

Open ivanov opened 10 years ago

ivanov commented 10 years ago

This may add too much magic to the notebooks, but it might also be useful:

In IPython proper, we've flirted with the idea of having a "preamble" cell (i.e. one cell that would be auto-executed on notebook load - the idea being it would just have the imports common to the other cells, but would be "hidden" away from littering the normal notebook view), but it will probably not happen within IPython itself, so let me open a separate issue for that.

ankostis commented 8 years ago

One cell might not be enough; there are cases (i.e. declarativewidgets) where a both a %%html and normal python cell need to execute no load. Some alternative approaches would be:

  1. "mark" cells for auto-execution, or
  2. have a special cell (with a macro?) demarking the last cell to be auto-executed.