Show More
@@ -420,10 +420,10 b' class IGridGrid(wx.grid.Grid):' | |||
|
420 | 420 | elif keycode == ord("C") and sh: |
|
421 | 421 | col = self.GetGridCursorCol() |
|
422 | 422 | attr = self.table._displayattrs[col] |
|
423 |
ret |
|
|
423 | result = [] | |
|
424 | 424 | for i in xrange(self.GetNumberRows()): |
|
425 |
ret |
|
|
426 |
self.quit(ret |
|
|
425 | result.append(self.table._displayattrs[col].value(self.table.items[i])) | |
|
426 | self.quit(result) | |
|
427 | 427 | elif keycode in (wx.WXK_ESCAPE, ord("Q")) and not (ctrl or sh): |
|
428 | 428 | self.quit() |
|
429 | 429 | elif keycode == ord("<"): |
@@ -568,14 +568,14 b' class IGridGrid(wx.grid.Grid):' | |||
|
568 | 568 | attrs = [ipipe.AttributeDetail(item, attr) for attr in ipipe.xattrs(item, "detail")] |
|
569 | 569 | self._doenter(attrs) |
|
570 | 570 | |
|
571 |
def quit(self, ret |
|
|
571 | def quit(self, result=None): | |
|
572 | 572 | """ |
|
573 | 573 | quit |
|
574 | 574 | """ |
|
575 | 575 | frame = self.GetParent().GetParent().GetParent() |
|
576 | 576 | if frame.helpdialog: |
|
577 | 577 | frame.helpdialog.Destroy() |
|
578 |
frame.parent.ret |
|
|
578 | frame.parent.result = result | |
|
579 | 579 | frame.Close() |
|
580 | 580 | frame.Destroy() |
|
581 | 581 | |
@@ -783,6 +783,7 b' class IGridFrame(wx.Frame):' | |||
|
783 | 783 | class App(wx.App): |
|
784 | 784 | def __init__(self, input): |
|
785 | 785 | self.input = input |
|
786 | self.result = None # Result to be returned to IPython. Set by quit(). | |
|
786 | 787 | wx.App.__init__(self) |
|
787 | 788 | |
|
788 | 789 | def OnInit(self): |
@@ -799,7 +800,6 b' class igrid(ipipe.Display):' | |||
|
799 | 800 | (which is curses-based) or ``idump`` (which simply does a print). |
|
800 | 801 | """ |
|
801 | 802 | def display(self): |
|
802 | self.returnobj = None | |
|
803 | 803 | app = App(self.input) |
|
804 | 804 | app.MainLoop() |
|
805 |
return |
|
|
805 | return app.result |
General Comments 0
You need to be logged in to leave comments.
Login now