def find_deps(outstream, strace_out, show_all):
    # 7978  open("/etc/ld.so.cache", O_RDONLY|O_CLOEXEC) = 3
    # get "mode" file was open, until ')' is closed
    # ignore rest of line
    # .*\(                 # ignore text until '('
    # "(?P<file>[^"]*)"    # get "file" name inside "
    # , (\[.*\])*          # ignore elments if inside [] - used by execve
    # (?P<mode>[^)]*)\)    # get mode opening file
    #  = ].*               # check syscall was successful""",
    regex = re.compile(r'.*\("(?P<file>[^"]*)",' +
                       r' (\[.*\])*(?P<mode>[^)]*)\) = [^-].*')

    read = set()
    write = set()
    cwd = os.getcwd()
    if not os.path.exists(strace_out):
        return
    with open(strace_out) as text:
        for line in text:
            # ignore non file operation
            match = regex.match(line)
            if not match:
                continue
            rel_name = match.group('file')
            name = os.path.abspath(rel_name)

            # ignore files out of cwd
            if not show_all:
                if not name.startswith(cwd):
                    continue

            if 'WR' in match.group('mode'):
                if name not in write:
                    write.add(name)
                    outstream.write("W %s\n" % name)
            else:
                if name not in read:
                    read.add(name)
                    outstream.write("R %s\n" % name)
Creates the table for the scatter plot.
dataset/ETHPy150Open pydoit/doit/doit/cmd_strace.py/find_deps--crossover with--dataset/ETHPy150Open beltashazzer/jmpy/jmpy/plotting/components.py/regressiontable