openbabel/openbabel — pull request #80 by patrickfuller (2014-06-02 23:59:59+00:00)
Title: Updated webGL viewer to use recommended IPython v2.0 style

I added the webGL viewer to RDKit about a month back (rdkit/rdkit#257), and used it as an opportunity to use IPython v2.0's new [install_nbextension](http://ipython.org/ipython-doc/stable/api/generated/IPython.html.nbextensions.html) feature. This commit is basically a port of the improvements made in the RDKit pull request. This should reduce memory overhead, especially in cases where multiple webGL molecules are drawn.

The logic here copies `imolecule.min.js` to the python install directory (a little awkward to put a js file in a python directory, but I couldn't think of a better alternative). When a user requests a webGL drawing, the code checks to see if it's installed, and installs if needed.

Note that this breaks webGL for IPython <2.0.