(self, text, insert_tags=None)
Make dialog visible on top of others and ready to use.

        Also, highlight the currently selected text and set the
        search to include the current selection (self.ok).

        Args:
            text: Text widget being searched.
Make dialog visible on top of others and ready to use.
Make dialog visible on top of others and ready to use .
def open(self, text, insert_tags=None):
        """Make dialog visible on top of others and ready to use.

        Also, highlight the currently selected text and set the
        search to include the current selection (self.ok).

        Args:
            text: Text widget being searched.
        """
        SearchDialogBase.open(self, text)
        try:
            first = text.index("sel.first")
        except TclError:
            first = None
        try:
            last = text.index("sel.last")
        except TclError:
            last = None
        first = first or text.index("insert")
        last = last or first
        self.show_hit(first, last)
        self.ok = True
        self.insert_tags = insert_tags
def open ( self , text , insert_tags = None ) : SearchDialogBase . open ( self , text ) try : first = text . index ( "sel.first" ) except TclError : first = None try : last = text . index ( "sel.last" ) except TclError : last = None first = first or text . index ( "insert" ) last = last or first self . show_hit ( first , last ) self . ok = True self . insert_tags = insert_tags