From 771b4a303c485c2311d8374915927a72da343ad0 Mon Sep 17 00:00:00 2001 From: "matthias@arch" Date: Mon, 15 May 2023 23:57:38 +0200 Subject: [PATCH] Added write_configuration method --- regina/utility/globals.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/regina/utility/globals.py b/regina/utility/globals.py index 5cd2b11..45f1ccf 100644 --- a/regina/utility/globals.py +++ b/regina/utility/globals.py @@ -289,7 +289,10 @@ cfg.add_section("debug", desc="", entries=[ settings = ReginaSettings(cfg) # settings.load("generated-default.cfg") -if __name__ == "__main__": +def write_config(): # export the configuration as generated-default.cfg - with open("generated-default.cfg", "w") as file: + with open("regina-default.cfg", "w") as file: file.write(f"{cfg}") + +if __name__ == "__main__": + write_config()