Lines Matching refs:path
32 HERE = os.path.dirname(os.path.abspath(__file__))
33 TEST = os.path.dirname(HERE) # test/odf-validate
34 JOBS = os.path.join(TEST, "runs", "gate-t16f", "jobs.tsv")
35 DEFAULT_ROOT = os.path.join(TEST, "runs", "phase3", "foreign")
81 if not p or p in seen or not os.path.isfile(p):
85 sz = os.path.getsize(p)
92 dirs.setdefault(os.path.dirname(p), []).append((-sz, p))
100 key = (os.path.splitext(os.path.basename(p))[0], OUT_EXT[ext])
109 def read_list(path): argument
111 with open(path, encoding="utf8") as fh:
115 out.append(os.path.abspath(p))
124 os.makedirs(os.path.join(d, "user"), exist_ok=True)
125 with open(os.path.join(d, "user", "registrymodifications.xcu"), "w", encoding="utf8") as fh:
190 def inspect(path): argument
194 z = zipfile.ZipFile(path)
217 src = os.path.join(work, "probe-input")
219 doc = os.path.join(src, "probe.odt")
231 dirs = [os.path.join(work, "probe-prof-%d" % n) for n in range(lo, hi + 1)]
237 out = os.path.join(work, "probe-out-%d" % n)
239 f = os.path.join(out, "probe.odt")
240 if os.path.exists(f):
242 run_convert(soffice, prof, "odt", out, [doc], 300, os.path.join(work, "probe.log"))
243 if not os.path.exists(f):
262 soffice = os.path.abspath(a.soffice)
270 probe(soffice, os.path.abspath(a.probe), (lo, hi))
277 root = os.path.abspath(a.root)
278 profs = {m: os.path.join(root, "foreign-prof-" + m) for m in modes}
284 inputs = [p for p in inputs if os.path.isfile(p)]
290 k = (os.path.splitext(os.path.basename(p))[0], OUT_EXT[ext])
296 os.makedirs(os.path.join(root, "logs"), exist_ok=True)
303 outdir = os.path.join(root, m)
305 log = os.path.join(root, "logs", m + ".log")
309 o = os.path.join(outdir, os.path.splitext(os.path.basename(p))[0] + "." + oe)
310 if os.path.exists(o):
317 missing = [(p, o) for p, o in chunk if not os.path.exists(o)]
326 o = os.path.join(outdir, os.path.splitext(os.path.basename(p))[0] + "." + oe)
327 if not os.path.exists(o):
347 with open(os.path.join(root, "manifest.tsv"), "w", encoding="utf8") as fh:
357 …print("manifest: %s (%d rows, %d not ok)" % (os.path.join(root, "manifest.tsv"), len(rows), len(ba…