docs/generate_samples.py now use py3

This commit is contained in:
hakril
2024-06-10 21:27:13 +02:00
parent 59b3531d15
commit 8472fd12a7
+2 -2
View File
@@ -13,9 +13,9 @@ python_exe = sys.executable
def generate_output_result(target, output):
print("Generating result of <{0}>".format(target))
p = subprocess.Popen([python_exe, target], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, shell=True)
p = subprocess.Popen([python_exe, target], stdout=subprocess.PIPE, stderr=subprocess.STDOUT, text=True, shell=True)
result = p.communicate()
with open(os.path.join(resultdir, output), "wb") as f:
with open(os.path.join(resultdir, output), "w") as f:
f.write("(cmd) python {0}\n".format(target))
f.write(result[0])