From 8472fd12a716bf7402aa9f5729a630cd13f0bad0 Mon Sep 17 00:00:00 2001 From: hakril Date: Mon, 10 Jun 2024 21:27:13 +0200 Subject: [PATCH] docs/generate_samples.py now use py3 --- docs/generate_samples.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/generate_samples.py b/docs/generate_samples.py index 5c81cc2..0a9f0d9 100644 --- a/docs/generate_samples.py +++ b/docs/generate_samples.py @@ -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])