Skip to Content
Tkinter GUI Programming by Example
book

Tkinter GUI Programming by Example

by David Love
April 2018
Beginner content levelBeginner
340 pages
7h 54m
English
Packt Publishing
Content preview from Tkinter GUI Programming by Example

Searching text

When we need to find a specific piece of text within a Text widget, there is a method called search which will allow us to do this easily.

The search method can take quite a lot of arguments:

  • pattern: The pattern to match. This can be either an exact match or a regular expression.
  • index: Where to begin the search from.
  • stopindex: Where to stop ending a search. If this is not specified, the search will loop.
  • forwards: Whether to search from the top to the bottom (this is the default).
  • backwards: Whether to search from bottom to top.
  • exact: Exact match instead of a regular expression (this is the default).
  • regexp: Indicates that the pattern supplied is a regular expression.
  • nocase: Whether to ignore case.
  • count: A variable which ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Tkinter GUI Application Development Blueprints, Second Edition - Second Edition

Bhaskar Chaudhary

Publisher Resources

ISBN: 9781788627481Supplemental Content