args = [clingo, "0", parse_ret.file, "-Wnone"]
b = os.path.splitext(parse_ret.file)[0]
if os.path.exists(b + ".cmd"):
- with open(b + ".cmd", 'rU') as cmd_file:
+ with open(b + ".cmd", 'r') as cmd_file:
for x in cmd_file:
args.extend(x.strip().split())
args.extend(extra_argv)
for f in sorted(files):
if f.endswith(".lp"):
b = os.path.join(root, f[:-3])
- with open(b + ".lp", 'rU', encoding='utf-8') as inst_file:
+ with open(b + ".lp", 'r', encoding='utf-8') as inst_file:
inst = inst_file.read()
if (not with_python and re.search(r"#script[ ]*\(python\)", inst)) or \
(not with_lua and re.search(r"#script[ ]*\(lua\)", inst)) or \
args = [clingo, "0", b + ".lp", "-Wnone"]
if os.path.exists(b + ".cmd"):
- with open(b + ".cmd", 'rU') as cmd_file:
+ with open(b + ".cmd", 'r') as cmd_file:
for x in cmd_file:
args.extend(x.strip().split())
args.extend(extra_argv)
out, err = sp.Popen(args, stderr=sp.PIPE, stdout=sp.PIPE, universal_newlines=True).communicate()
norm = normalize(out)
- with open(b + ".sol", 'rU') as sol_file:
+ with open(b + ".sol", 'r') as sol_file:
sol = reorder(sol_file.read())
if norm != sol:
failed+= 1