[IPython-user] ipython1.frontend status
Thu Jun 5 01:03:04 CDT 2008
Following discussion of the last couple days, I thought I'd update
folks on the status of ipython1.frontend in the ipython1-cocoa branch.
I've made a first stab at the frontend.frontendbase module and have
implemented a bare-bones Cocoa frontend for ipython1. I subclassed
Cocoa's text view widget (well, actually I wrote a delegate for the
NSTextView, but it could have been done as a subclass) and also
subclassed frontend.frontendbase.FrontEndBase. Besides the code to
handle the appropriate events/text layout etc. which are specific to
Cocoa, my Cocoa frontend required about 200 lines of code. I think
it's a pretty good start for similar endeavors in Qt or Wx etc.
One issue that's come up is that the deferred result
ipython1.kernel.engineservice.EngineService.execute has a string
representation of the block's output (in result['display']['pprint']),
but there's no way to get the actual python object that generated that
string. This prevents the frontend from e.g. rendering an image result
inline. I realize this is because the engine may be remote, but in the
case of (1) serializeable objects or (2) local engines, it seems that
we might want to add an option to execute to return the actual result
as well as its pprint/repr...
More information about the IPython-user