[IPython-dev] How-To create persistent, interactive UI elements outside cells

Hack-The-Paradise sk.spiros at hotmail.com
Fri Nov 28 08:59:02 EST 2014


Hello World,

Me and my colleagues we are working on a project concerning big data
handling, filtering and visualizing. We are trying to use IPython Notebook
as our UI. We think that Notebook is a very nice and suitable tool.

Our goal is to extend its functionality according to our needs.
We have encountered some problems during this procedure and we tried to ask
for help in  https://gitter.im/ipython/ipython/help#
<https://gitter.im/ipython/ipython/help#>    but the answers were very
limited, so i took the initiative to ask also here.

We are trying to create (let’s say) a custom UI element and want to connect
it with the server side (e.g. a help button with dynamic content in the
toolbar).

*Our main objective* is that we want to share this UI element on all our
notebooks and load that on the startup of every notebook automatically. *So
It should not be coupled with the cells*. 

A perfect example of what we are trying to achieve is the following:
Let’s assume that we have what is described in this github repository:
https://github.com/ipython-contrib/IPython-notebook-extensions/wiki/help_panel

When the user clicks a button a list of help is shown on a panel on the
right side of the screen.
Currently, the data that populate this panel are static and what we want is
to replace this by using iPython MVC widgets framework to have a model of
these data stored on the notebook server. So that the list is synchronized
with the model. *The code for this should not be typed into the cells but
should be executed automatically upon loading of a notebook* (i.e. creating
or opening an existing notebook).

*Is there a functionality already built-in in ipython/notebook that
implements something similar or we need to create/extend that?* Given the
fact that we have limited time. 

Some of our ideas were:
-	Hiding specific cells with the code (also protecting them in order to
emulate persistency)
-	execute JavaScript code from markdown cells (but I think this is not
possible anymore or not?)

i think that the following conversation is similar to our interest:
http://python.6.x6.nabble.com/Feasilibity-of-widgets-layout-for-mimicking-this-td5068197.html

The following image is also a nice example of what we want to accomplish but
it is not complete. In that case the code is implemented in cells
<http://python.6.x6.nabble.com/file/n5079080/wP3VmWK.png> 

*P.S.:* Of course we already managed to build our own widgets following the
given structure and using JavaScript but still we could not avoid using
cells (at least for display command)
We can provide code snippets if it is necessary.

*Our default Env:*
Anaconda 2.1.0 (x64) – iPython 2.3.1 – Python 2.7.8




--
View this message in context: http://python.6.x6.nabble.com/How-To-create-persistent-interactive-UI-elements-outside-cells-tp5079080.html
Sent from the IPython - Development mailing list archive at Nabble.com.



More information about the IPython-dev mailing list