From: Jason G. <jas...@cr...> - 2013-10-16 20:47:09
|
On 10/16/13 1:58 PM, Michael Droettboom wrote: > Sorry to take so long to get to this. This is a nice piece of work. > > The most obvious thing is that this is a copy-and-paste of the existing > WebAgg backend -- and maintaining the two is going to be much harder > than building both out of the same pieces. As of 6389d14f, the WebAgg > backend was refactored so that the transport that it uses to communicate > to the browser is no longer hard coded. This was done in large part to > support working with IPyhton in this way. (That is, it used to only > communicate with the browser through Tornado, but now it can be anything > that can send bits back and forth). There's an example of this in > `examples/user_interfaces/embedding_webagg.py` that shows how to do this > (using Tornado, but again, it doesn't have to be). There's no guarantees > that this interface is sufficient, so it may require some back and forth > on this to make it all work. > > I think the first thing I would do would be to refactor this to use > that. It's a little hard to tell what you've changed from the original > WebAgg backend to get it to support IPython. If it were built on top > of, rather than in addition to, WebAgg, that would be more obvious. Thanks for the feedback. I was thinking that a refactor to pull out the communication layer would be really nice. I didn't change the WebAgg backend because I figured you wanted it around still. I figured a plain old diff with the file would reveal changes. Anyways, thanks for the pointer to the refactor commit. I hope to look at this again sometime soon. Jason |