From 5bc3dab10c6b231b1f019464a0bad09011096024 Mon Sep 17 00:00:00 2001 From: EKNr1 Date: Tue, 19 Nov 2024 18:53:22 +0100 Subject: [PATCH] Made it working dir independent. --- gui/raw_ui/ui_to_py.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/gui/raw_ui/ui_to_py.py b/gui/raw_ui/ui_to_py.py index e666ff6..ac953c1 100644 --- a/gui/raw_ui/ui_to_py.py +++ b/gui/raw_ui/ui_to_py.py @@ -2,6 +2,11 @@ import os +working_dir = os.getcwd() + +if not working_dir.split('/')[-1] == "raw_ui": # cd into the right directory if this gets executed from somewhere else + os.chdir(os.path.dirname(os.path.abspath(__file__))) + input_debug = input("Do you want to debug the gui scripts? (Make gui scripts executable.) (y/n): ") debug = input_debug == "y"