From 3ca8184f96e8f072223347c8c0a0752feae3fd51 Mon Sep 17 00:00:00 2001 From: Christopher Spinrath <christopher.spinrath@univ-grenoble-alpes.fr> Date: Wed, 19 Feb 2025 19:08:50 +0100 Subject: [PATCH] Expand ~ to user directory in path-like variables --- run-exp.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run-exp.py b/run-exp.py index 72cda43..fe326a5 100755 --- a/run-exp.py +++ b/run-exp.py @@ -40,7 +40,7 @@ class Variable: assert var_type in ["file", "range"], "Unsupported variable type." if var_type == "file": - directory = pathlib.Path(value_config["directory"]) + directory = pathlib.Path(value_config["directory"]).expanduser() assert directory.exists() and directory.is_dir() values = list(directory.iterdir()) -- GitLab