[IPython-dev] D3js and IPython

lecast martin.zmk@gmail....
Wed Jan 9 05:57:38 CST 2013


I had a look at jsplugins and indeed it makes sense to use that in my
context, although I would still keep my class for rendering static things
or things that use css for interactivity.

However, the way I understand is that js in unwanted in the saved output
because it may communicate with the kernel, and that in turn can do
whatever. Wouldn't escaping just such calls be an option too?

For the jsplugins to work I think there should be an install function
within IPython where you point at some url that hosts the plugin. And,
there should be an easy way to extend plugins from within IPython so that
the user doesn't have to have file system access to add a script.

Also, the base of the code for my papers-style notebooks that extracts
footnotes is at http://nbviewer.ipython.org/4492534/

Z wyrazami szacunku,
Marcin Zamojski


On Wed, Jan 9, 2013 at 8:37 AM, Matthias Bussonnier [via Python] <
ml-node+s6n5001731h91@n6.nabble.com> wrote:

>
> > I do appreciate the concern, and we need a solution to the issue.
> > I just don't think we have a complete one yet.
> > Right now, we have a supremely flexible (and thus insecure) situation,
> > whereas jsplugins-only is secure, but not remotely flexible from a
> user's perspective.
> >
> > This is an extremely serious incapacitation of the notebook.
> > The trouble is that jsplugins is a relatively tolerable substitue
> > for the single-user notebook, but where the problem is worst
> > is when users don't actually have access to the server
> > to install jsplugins.  So it's precisely the case where we
> > would not allow custom js that jsplugins fail most dramatically
> > as a substitute.
> >
> > Is it really our intention to require *server* installation of a plugin
> > for a user to gain access to a new widget? That seems to eliminate a
> *huge* portion of exactly what makes the notebook interesting.
> >
> > If we have a way that js plugins can be loaded at runtime by the user
> without access to the server (presumably with a 'do you trust this guy?'
> confirmation),
> > then that would go a long way toward preventing the total castration of
> the notebook.
> >
>
> The problem is that if we escape javascript in output to prevent js
> execution at load time we do make
> injecting javascript **script tag** useless in markdown and cell ouput.
>
> This is a slight difference than displaying javascript with the Javascript
> object that actually evaluate the string of code.
> It is also dangerous in multi-user context, even if this javascript is not
> runned at load time.
>
> I think that Json plugin are much better than current structure because
> one of the first plugin you can write can evaluate javascript
> code, so it actually does the same as Javascript object.
> But, If you design a custom plugin that deal with a specific type of json
> data, then you get the ability for this data to be used
> at load time as the json repr is stored.
>
> And I do agree that we need to give users a way to still display JS.
>
> I still think we should **strongly** encourage them not to use Javascript
> object because of it's inherent evaluation
> which is not stored. It is nice for prototyping, but it does more harm
> than anything for sharing.
>
> Finally I suppose it will be doable and a good thing to develop the
> ability to plug those jsplugin to nbviewer.
> --
> Matthias
>
>
>
> _______________________________________________
> IPython-dev mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5001731&i=0>
> http://mail.scipy.org/mailman/listinfo/ipython-dev
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
> http://python.6.n6.nabble.com/D3js-and-IPython-tp5001661p5001731.html
>  To unsubscribe from D3js and IPython, click here<http://python.6.n6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5001661&code=bWFydGluLnpta0BnbWFpbC5jb218NTAwMTY2MXw2OTczNzc0NDY=>
> .
> NAML<http://python.6.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://python.6.n6.nabble.com/D3js-and-IPython-tp5001661p5001767.html
Sent from the IPython - Development mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.scipy.org/pipermail/ipython-dev/attachments/20130109/ad9dc329/attachment.html 


More information about the IPython-dev mailing list