'Wait for a command to complete.
Completion is signaled by a sentinel character, ASCII(127)
appearing in the output stream.  Wait for the sentinel and return
the output, including trailing newline.
verbose: print output interactively'

def waitOutput(self, verbose=False, findPid=True):

    log = (info if verbose else debug)
    output = ''
    while self.waiting:
        data = self.monitor(findPid=findPid)
        output += data
        log(data)
    return output
