mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
docs/generate_samples.py now use py3
This commit is contained in:
@@ -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])
|
||||
|
||||
|
||||
Reference in New Issue
Block a user