def parse_outfile(out_file):
    deps = []
    jslibs = []

    f = open(out_file)
    spos = os.path.getsize(out_file) - 200
    if spos < 0:
        spos = 0
    while True:
        f.seek(spos)
        txt = f.read(200)
        p = txt.find('/* end module:')
        if p >= 0:
            f.seek(spos + p)
            txt = f.read()
            break
        spos -= 100
        if spos < 0:
            raise ValueError("Invalid file: %s" % out_file)
    for l in txt.split("\n"):
        if l.startswith("PYJS_DEPS:"):
            deps = eval(l[10:])

    for l in txt.split("\n"):
        if l.startswith("PYJS_JS:"):
            jslibs = eval(l[8:])

    f.close()

    return deps, jslibs
dataset/ETHPy150Open anandology/pyjamas/pyjs/src/pyjs/linker.py/parse_outfile/original