def searchexpression(self, searchexp, startrow=None, search_forward=True ):
        frame = self.GetParent().GetParent().GetParent()
        if searchexp:
            if search_forward:
                if not startrow:
                    row = self.GetGridCursorRow()+1
                else:
                    row = startrow + 1
                while True:
                    try:
                        foo = self.table.GetValue(row, 0)
                        item = self.table.items[row]
                        try:
                            globals = ipipe.getglobals(None)
                            if eval(searchexp, globals, ipipe.AttrNamespace(item)):
                                self.SetGridCursor(row, 0) # found something
                                self.MakeCellVisible(row, 0)
                                break
                        except (KeyboardInterrupt, SystemExit):
                            raise
                        except Exception as exc:
                            frame.SetStatusText(str(exc))
                            wx.Bell()
                            break  # break on error
                    except IndexError:
                        return
                    row += 1
            else:
                if not startrow:
                    row = self.GetGridCursorRow() - 1
                else:
                    row = startrow - 1
                while True:
                    try:
                        foo = self.table.GetValue(row, 0)
                        item = self.table.items[row]
                        try:
                            globals = ipipe.getglobals(None)
                            if eval(searchexp, globals, ipipe.AttrNamespace(item)):
                                self.SetGridCursor(row, 0) # found something
                                self.MakeCellVisible(row, 0)
                                break
                        except (KeyboardInterrupt, SystemExit):
                            raise
                        except Exception as exc:
                            frame.SetStatusText(str(exc))
                            wx.Bell()
                            break  # break on error
                    except IndexError:
                        return
                    row -= 1
Find by expression
dataset/ETHPy150Open ipython/ipython-py3k/IPython/deathrow/igrid.py/IGridGrid.searchexpression