From 363340d79611a7888bb83835cbc16c2e53a45f91 Mon Sep 17 00:00:00 2001 From: hubobel Date: Sat, 6 Jun 2026 16:44:19 +0200 Subject: [PATCH] =?UTF-8?q?flexibles=20testen=20m=C3=B6glich=20Pycharm/Pro?= =?UTF-8?q?duktiv?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- test.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test.py b/test.py index d3349fd..ddaecde 100644 --- a/test.py +++ b/test.py @@ -5,10 +5,18 @@ from urllib.request import urlopen from datetime import datetime from fints.client import FinTS3PinTanClient +# Konfiguration laden # Konfiguration laden config = {} -with open(Path.home() / ".ing.conf") as f: +# Zuerst Home-Verzeichnis prüfen +config_file = Path.home() / ".ing.conf" + +# Falls nicht vorhanden, Datei neben dem Skript verwenden +if not config_file.exists(): + config_file = Path(__file__).parent / ".ing.conf" + +with open(config_file, encoding="utf-8") as f: for line in f: line = line.strip() @@ -21,7 +29,6 @@ with open(Path.home() / ".ing.conf") as f: key, value = line.split("=", 1) config[key] = value - # ING USER = config["ING_USER"] PIN = config["ING_PIN"]