(self, text, kv='both', typ=(rTyp['STR'],))
| 80 | for k in key.walk(): |
| 81 | yield k |
| 82 | def grep(self, text, kv='both', typ=(rTyp['STR'],)): |
| 83 | # searching keys and/or values for some text |
| 84 | for k in self.walk(): |
| 85 | if kv in ('keys', 'both') and text in k.name: |
| 86 | yield k, None |
| 87 | if kv in ('vals', 'both'): |
| 88 | for v in k.vals: |
| 89 | if (v.typ in typ) and (text in v.val): |
| 90 | yield k, v |
| 91 | def grep2(self, text, kv='both', typ=(rTyp['STR'],)): |
| 92 | # a grep variant, might be more convinient in some cases |
| 93 | kb=None |