[IPython-dev] How to preconfigure notebook environment in v1.1?
pi at berkeley.edu
Thu Oct 31 00:11:09 EDT 2013
Adam Sadovsky, on 2013-10-30 20:28, wrote:
> I recently upgraded from IPython 0.13 to 1.1.
> In 0.13, I was able to execute code in each notebook at startup, but the
> kernel code has changed and I can't figure out how to do it anymore. Could
> someone point me in the right direction?
why not just use a file in the startup directory?
$ echo `ipython locate profile`/startup/
$ cat `ipython locate profile`/startup/README
This is the IPython startup directory
.py and .ipy files in this directory will be run *prior* to any
code or files specified
via the exec_lines or exec_files configurables whenever you load
Files will be run in lexicographical order, so you can control
the execution order of files
with a prefix, e.g.::
A* \^ -
,./ _.`\\ / \
/ ,--.S \/ \
/ `"~,_ \ \
_ \<,_ /:\
--(_)/-(_)----.../ | \
More information about the IPython-dev