Ich hab mal wieder einen Hänger mit Python:
location.conf
location.py
Ich bekomme eine Fehlermeldung, dass es das Attribut offset_day nicht gibt.
Diese Alternative geht aber auch nicht:
Wie muss ich das Attribut auslesen, wenn ich es in einer Logik o.ä. verwerten will und keine def __init__ mit Parametern habe?
Viele Grüße
Andi
location.conf
Code:
[env] [[location]] [[[day]]] type = bool offset_day = -6 [[[night]]] type = bool
Code:
if (self.offset_day): offset_day = self.offset_day
Diese Alternative geht aber auch nicht:
Code:
if (sh.env.location.day(offset_day)): offset_day= sh.env.location.day(offset_day)
Viele Grüße
Andi
Kommentar