From 6ddd6ea45738fb0dab1f092b7824b4d00eec2830 Mon Sep 17 00:00:00 2001 From: Michal Keslin Date: Mon, 29 May 2023 13:31:49 +0300 Subject: [PATCH] Added the function fill_in_the_blanks for modifing folder name --- arc/common.py | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/arc/common.py b/arc/common.py index 241893e0c9..02593ace13 100644 --- a/arc/common.py +++ b/arc/common.py @@ -1699,3 +1699,16 @@ def is_xyz_mol_match(mol: 'Molecule', if element not in element_dict_xyz or element_dict_xyz[element] != count: return False return True + + +def fill_in_the_blanks(folder_name: str): + """ + Adding backslashes before spaces in the folder name. + + Args: + folder_name (str): The string directory we want to modify. + + Returns: + str: Modified folder name. + """ + return folder_name.replace(" ", "\ ")