MCPcopy Create free account
hub / github.com/qilingframework/qiling / highlight_pattern

Method highlight_pattern

tests/view_perf_results.py:49–62  ·  view source on GitHub ↗
(self, tag, keyword)

Source from the content-addressed store, hash-verified

47 msgbox.showerror("Error...", "Unable to load selected file")
48
49 def highlight_pattern(self, tag, keyword):
50 start = self.scrollData.index("1.0")
51 end = self.scrollData.index("end")
52 self.scrollData.mark_set("matchStart", start)
53 self.scrollData.mark_set("matchEnd", start)
54 self.scrollData.mark_set("searchLimit", end)
55 count = IntVar()
56 while True:
57 index = self.scrollData.search(keyword, "matchEnd", "searchLimit", count=count, regexp=False)
58 if index == "": break
59 if count.get() == 0: break
60 self.scrollData.mark_set("matchStart", index)
61 self.scrollData.mark_set("matchEnd", "%s+%sc" % (index, count.get() ))
62 self.scrollData.tag_add(tag, "matchStart", "matchEnd")
63
64
65def console_print(filename):

Callers 1

open_perf_fileMethod · 0.95

Calls 2

searchMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected