[IPython-dev] loading a static JS file when loading an IPython extension in the notebook
benjaminrk at gmail.com
Sat Jul 12 12:20:31 EDT 2014
On Fri, Jul 11, 2014 at 8:38 AM, Nicholas Bollweg <nick.bollweg at gmail.com>
> Here's the most recent thread on that:
> I captured some of the pattens into a cookiecutter template:
Very nice! We should probably have something like this in the IPython docs.
> You can use this pattern, even if you aren't using widgets, though.
> The key chores are:
> - make sure your static files, in a folder, get copied on install
> - when you are ready to use your JS, copy static into the nbextensions directory
> (in the users profile) with
> - display them (and/or any css) with display
> Here is the file I use for encapsulating those steps:
> It gets called each time an instance of a class is instantiated. It was
> suggested that this is preferable over loading it at import time.
> Hope this helps!
> On Thu, Jul 10, 2014 at 8:48 AM, Cyrille Rossant <
> cyrille.rossant at gmail.com> wrote:
>> What is the best way to write an IPython extension such that
>> `%load_ext myext` loads `myscript.js` in the current notebook? If
>> possible, I'd prefer to avoid asking users to make manual changes to
>> custom.js or similar.
>> IPython-dev mailing list
>> IPython-dev at scipy.org
> IPython-dev mailing list
> IPython-dev at scipy.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the IPython-dev