From eb3c510f82a8fb75daaac6eb1069ae87d1a69562 Mon Sep 17 00:00:00 2001 From: piair Date: Wed, 22 Jun 2022 18:58:28 +0200 Subject: [PATCH] better path handeling --- V4.py | 2 +- main.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/V4.py b/V4.py index ff08997..03a0e8c 100755 --- a/V4.py +++ b/V4.py @@ -72,7 +72,7 @@ if IsLinux: else: system("") # enable colors in cmd -config_path = "/home/pi/MsReward/config" +config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/config" config = configparser.ConfigParser() config.read(config_path) #path comfigurations diff --git a/main.py b/main.py index 26d55a1..532e243 100644 --- a/main.py +++ b/main.py @@ -4,7 +4,7 @@ import enquiries import configparser import os -config_path = "/home/pi/MsReward/Git/MsReward/config" +config_path = f"{os.path.abspath( os.path.dirname( __file__ ) )}/config" config = configparser.ConfigParser() config.read(config_path)