flexibles testen möglich Pycharm/Produktiv

This commit is contained in:
hubobel 2026-06-06 16:44:19 +02:00
parent a674c1776b
commit 363340d796

11
test.py
View file

@ -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"]