(pattern: Pattern)
return next(matches, None) is not None
Returns true iff this process is a child process of a process whose name matches pattern
Returns true iff this process is a child process of a process whose name matches pattern
Returns true iff this process is a child process of a process whose name matches pattern
def is_child_process_of(pattern: Pattern) -> bool:
    """
    Returns true iff this process is a child process of a process whose name matches pattern
    """
    me = psutil.Process()
    parents = me.parents()
    matches = iter(0 for p in parents if pattern.search(p.name()))
    return next(matches, None) is not None
def is_child_process_of ( pattern : Pattern ) -> bool : me = psutil . Process ( ) parents = me . parents ( ) matches = iter ( 0 for p in parents if pattern . search ( p . name ( ) ) ) return next ( matches , None ) is not None