Table of Contents

Class: SearchEngine Idle/idle8/SearchEngine.py

Methods   
__init__
getcookedpat
getpat
getprog
isback
iscase
isre
isword
iswrap
report_error
search_backward
search_forward
search_text
setcookedpat
setpat
  __init__ 
__init__ ( self,  root )

  getcookedpat 
getcookedpat ( self )

  getpat 
getpat ( self )

  getprog 
getprog ( self )

  isback 
isback ( self )

  iscase 
iscase ( self )

  isre 
isre ( self )

  isword 
isword ( self )

  iswrap 
iswrap ( self )

  report_error 
report_error (
        self,
        pat,
        msg,
        col=-1,
        )

  search_backward 
search_backward (
        self,
        text,
        prog,
        line,
        col,
        wrap,
        ok=0,
        )

  search_forward 
search_forward (
        self,
        text,
        prog,
        line,
        col,
        wrap,
        ok=0,
        )

  search_text 
search_text (
        self,
        text,
        prog=None,
        ok=0,
        )

Search a text widget for the pattern.

If prog is given, it should be the precompiled pattern. Return a tuple (lineno, matchobj); None if not found.

This obeys the wrap and direction (back) settings.

The search starts at the selection (if there is one) or at the insert mark (otherwise). If the search is forward, it starts at the right of the selection; for a backward search, it starts at the left end. An empty match exactly at either end of the selection (or at the insert mark if there is no selection) is ignored unless the ok flag is true -- this is done to guarantee progress.

If the search is allowed to wrap around, it will return the original selection if (and only if) it is the only match.

  setcookedpat 
setcookedpat ( self,  pat )

  setpat 
setpat ( self,  pat )


Table of Contents

This document was automatically generated on Wed Mar 26 19:02:14 2003 by HappyDoc version 2.1