flexibles testen möglich Pycharm/Produktiv
This commit is contained in:
parent
a674c1776b
commit
363340d796
1 changed files with 9 additions and 2 deletions
11
test.py
11
test.py
|
|
@ -5,10 +5,18 @@ from urllib.request import urlopen
|
||||||
from datetime import datetime
|
from datetime import datetime
|
||||||
from fints.client import FinTS3PinTanClient
|
from fints.client import FinTS3PinTanClient
|
||||||
|
|
||||||
|
# Konfiguration laden
|
||||||
# Konfiguration laden
|
# Konfiguration laden
|
||||||
config = {}
|
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:
|
for line in f:
|
||||||
line = line.strip()
|
line = line.strip()
|
||||||
|
|
||||||
|
|
@ -21,7 +29,6 @@ with open(Path.home() / ".ing.conf") as f:
|
||||||
|
|
||||||
key, value = line.split("=", 1)
|
key, value = line.split("=", 1)
|
||||||
config[key] = value
|
config[key] = value
|
||||||
|
|
||||||
# ING
|
# ING
|
||||||
USER = config["ING_USER"]
|
USER = config["ING_USER"]
|
||||||
PIN = config["ING_PIN"]
|
PIN = config["ING_PIN"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue