def search(self, searchtext, startrow=None, startcol=None, search_forward=True):
        """
        search for ``searchtext``, starting in ``(startrow, startcol)``;
        if ``search_forward`` is true the direction is "forward"
        """
        searchtext = searchtext.lower()
        if search_forward:
            if startrow is not None and startcol is not None:
                row = startrow
            else:
                startcol = self.GetGridCursorCol() + 1
                row = self.GetGridCursorRow()
                if startcol >= self.GetNumberCols():
                    startcol = 0
                    row += 1
            while True:
                for col in range(startcol, self.table.GetNumberCols()):
                    try:
                        foo = self.table.GetValue(row, col)
                        text = self._getvalue(row, col)
                        if searchtext in text.string().lower():
                            self.SetGridCursor(row, col)
                            self.MakeCellVisible(row, col)
                            return
                    except __HOLE__:
                        return
                startcol = 0
                row += 1
        else:
            if startrow is not None and startcol is not None:
                row = startrow
            else:
                startcol = self.GetGridCursorCol() - 1
                row = self.GetGridCursorRow()
                if startcol < 0:
                    startcol = self.GetNumberCols() - 1
                    row -= 1
            while True:
                for col in range(startcol, -1, -1):
                    try:
                        foo = self.table.GetValue(row, col)
                        text = self._getvalue(row, col)
                        if searchtext in text.string().lower():
                            self.SetGridCursor(row, col)
                            self.MakeCellVisible(row, col)
                            return
                    except IndexError:
                        return
                startcol = self.table.GetNumberCols()-1
                row -= 1
dataset/ETHPy150Open ipython/ipython-py3k/IPython/deathrow/igrid.py/IGridGrid.search