[IPython-dev] Ways to attach javascript files to ipython notebooks

mgr inż. Jacek Bzdak jbzdak at gmail.com
Sun Aug 18 18:42:52 EDT 2013


I'll be trying to use Ipython Notebook in conjunction with google maps to
calculate some spatial distributions (in python) and display (in
javascript) results on a map.

I am looking for a way to attach static files to ipython notebook. I only
found this question on StackOverflow:
which points me here.

*What I have tried: *

I've heard about ipython plugins, but I guess it is not what I want,
because I don't want (yet) to create any generic solution.

All my problems would also be solved if I could modify window object inside
Javascript objects (like that):

from IPython.display import display,Javascript
Javascript("""bar = 5;""")

In this case I would just load javascript files by hand from python code.

*What I would like to do: *

   - Ability to attach javascript files from local filesystem (may be
   relative to ipython notebook location, but I'm ok with absolute files. I'm
   totally ok with loading these files globally, without any package
   management system, but I may use proper package management if needed.(this
   is required).
   - I also would have some way to manipulate global javascript context (to
   change output displayed on the map). (this is required).
   - Have ability to reload these files (when I'm making changes in js
   during developement). By reload I mean execute contents of these files
   again. (this would be nice to have)
   - Ability to generate some javascript on the fly (I might need it, but
   if it is hard nevermind).

If I overlook it in Ipython Notebook Manual please point me to appropriate
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20130819/5b661748/attachment.html>

More information about the IPython-dev mailing list