Here I am using a number of plugins that I am developping for tiddlywiki.
The
running of the python code is in a tiddler (project pythontest) with
base type 'text/html'. Tiddlers of this type are displayed in an iframe,
and must contain html markup as source. The full type of the tiddler is
'text/html;flexibility=tw5flexbox' the 'flexibility' is used by my
flexiblity plugin. There is a tiddler 'tw5flexbox' that contains rules
that tell (in this case) the plugin to take the source of the tiddler,
treat it as type 'text.vnd.tiddlywiki' then use the result as type
"text/hmtl". The "treat it as type 'text.vnd.tiddlywiki'" in this case
means to use templates to construct a html page from tiddlers - here I
use a system similar to the build-in save mechanism of tiddlywiki (when
you press the save button a new version your tiddlywiki as html is
constructed from its tiddlers.) in the content of the tiddler there is
the macro <<make_python pythontest>> which takes all the tiddlers tagged "pythontest" and builds a webpage from them.
The editing and running of the python code (in tidder "project pythontest"). uses my jtinker plugin, that use another of my plugins "mosaic", these provide the drag and drop grid and the ability to have different templates used in the grid (one for editing tiddlers the other to show a tiddler).
I also used my taglist plugin, which shows all tiddlers with the tag "pythontest" as a horizontal list. The order of this list affect the order of insertion of tiddlers into the html . The order of this list can be changed by drag and drop.
I have only release the taglist and flexibilty plugs, the others will be released in the future (once I am happy with them), and so I have hidden the plugins in the demo to stop the effective release of theses plugins by publishing the demo.