[IPython-dev] How to preconfigure notebook environment in v1.1?
asadovsky at gmail.com
Thu Oct 31 01:32:52 EDT 2013
Thanks for the reply! The reason I'd like to avoid startup files is that
I'm trying to provide a library for others to use. As part of this library,
I want it to be possible for people to start a notebook server where any
new notebook has a certain set of things pre-imported for convenience. I
suppose I could provide a startup file for users to place in their own
startup dirs, but I'd like to avoid making users do any extra work. Ideally
I'd like an option similar to what's offered in the interactive shell API,
which allows users to pass in a user_ns object. Does that make sense?
I should say, I'm relatively new to IPython/notebook and not very familiar
with its architecture, so I certainly may be missing something obvious. :)
On Wed, Oct 30, 2013 at 9:11 PM, Paul Ivanov <pi at berkeley.edu> wrote:
> 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.
> > someone point me in the right direction?
> Hi Adam,
> 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
> this profile.
> Files will be run in lexicographical order, so you can control
> the execution order of files
> with a prefix, e.g.::
> / \
> A* \^ -
> ,./ _.`\\ / \
> / ,--.S \/ \
> / `"~,_ \ \
> __o ?
> _ \<,_ /:\
> --(_)/-(_)----.../ | \
> Paul Ivanov
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev