This commit is contained in:
charlesbvll 2021-04-25 10:33:35 +02:00
parent e94c8458f0
commit a02e756644
2 changed files with 4 additions and 2 deletions

View File

@ -273,4 +273,5 @@ def create_empty_files(dir_out, net):
for i in range(7481): for i in range(7481):
name = "0" * (6 - len(str(i))) + str(i) + '.txt' name = "0" * (6 - len(str(i))) + str(i) + '.txt'
with open(os.path.join(dir_out[net], name), "a+"): pass with open(os.path.join(dir_out[net], name), "a+"):
pass

View File

@ -161,7 +161,8 @@ def read_and_rewrite(path_orig, path_new):
line_new = temp_1 + ' ' + hwl + ' ' + temp_2 + '\n' line_new = temp_1 + ' ' + hwl + ' ' + temp_2 + '\n'
ff.write("%s" % line_new) ff.write("%s" % line_new)
except FileNotFoundError: except FileNotFoundError:
with open(path_new, "a+"): pass with open(path_new, "a+"):
pass
def find_cluster(dd, clusters): def find_cluster(dd, clusters):