Commit 0fee176e authored by Lukas Riedel's avatar Lukas Riedel 🎧
Browse files

fixed bug where parfield creation would crash in Python3 due to raw_input call

parent 3173699f
......@@ -2,6 +2,11 @@ import os
import h5py
import numpy as np
try: # Python 2.x compatibility
input = raw_input
except NameError:
def read_parameter_file(in_path):
data_dict = {}
with h5py.File(in_path, 'r') as f:
......@@ -32,7 +37,7 @@ def write_parameter_file(group,data_dict,out_path,attrs=None,overwrite=False):
if os.path.isfile(out_path) and not overwrite:
ow = raw_input("The output file {} already exists. Overwrite? [y/N] ".format(out_path))
ow = input("The output file {} already exists. Overwrite? [y/N] ".format(out_path))
if not ow.lower() in ["y","yes"]:
raise RuntimeError("Aborting")
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment