def pgrep(self, pattern):
        pat = re.compile(pattern)
        for procinfo in self.list_processes():
            if pat.search(procinfo.args):
                yield procinfo
Process grep: return information about all processes whose command-line args match the given regex pattern
dataset/ETHPy150Open tomerfiliba/plumbum/plumbum/machines/local.py/LocalMachine.pgrep