[IPython-dev] Loading nbextension on widget instantiation

Nicholas Bollweg nick.bollweg at gmail.com
Wed Jun 18 19:53:43 EDT 2014


> class MyWidget(Widget):
>     view_name = 'WidgetView'
>     view_module = '/nbextensions/ipynbdbtk/js'
>
+1! Do want. Require.js, to me is kind of like submodules: don't use it if
you don't have to, but once you do, get used to it and go with it!


> Speaking of documentation: a template for building extensions with widgets
>> that that embodied the baseline of knowledge spread all over the community
>> would be great. I have used paste before, which seems kind of heavy these
>> days. Cookiecutter looks good:
>>
>
> I think we're really still working out what best practices are - and
> updating IPython's APIs as we work out things like this. By all means
> create a template, though - it can evolve as our knowledge and APIs improve.
>

Here's a whack at a cookiecutter pattern: I'm interested in feedback!
https://github.com/bollwyvl/cookiecutter-ipython-widget

Practically, cookiecutter is less mature than, say, yeoman, but it's
lighter-weight than either the paste stack or the whole node stack, so for
the time being, I think it's a good starting point.

I call out some other patterns that I'd like to see: i've already done some
d3 examples, so can probably pick up some stuff.

Cheers!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20140618/dc1633db/attachment.html>


More information about the IPython-dev mailing list