diff --git a/w.py b/w.py index 5dfa45e..8108214 100644 --- a/w.py +++ b/w.py @@ -61,7 +61,7 @@ response_update.raw.decode_content = True events_update = ElementTree.iterparse(response_update.raw) print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" -print "\n>>>> Upcoming: \n" +print "\n>>>> Upcoming: \n" for elem, even in events_update: @@ -74,7 +74,7 @@ for elem, even in events_update: condi = even.text if even.tag == 'F': - wind = even.text + windu = even.text if even.tag == 'ftime': @@ -83,7 +83,7 @@ for elem, even in events_update: if time >= justnow and time < mytime: print "Time:", time, "UTC" print "Temperature: ", temp, "°C" - print "Wind: ", wind, "m/s", " » " ,int(wind) * 3.6, "km/h" + print "Wind: ", windu, "m/s", " » " ,int(windu) * 3.6, "km/h" print "Conditions:", condi, "\n" #break # the fall @@ -94,7 +94,7 @@ print "~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~" if os.name is "posix" and platform.system() == "Linux": from gi.repository import Notify - notification_text = (name + "\n" + temperature + " C\n" + str(int(wind) *3.6) + " km/h\n Conditions: " + str(conditions)) + notification_text = (name + "\n" + temperature + " C\n" + str(int(wind) * 3.6) + " km/h\n Conditions: " + str(conditions)) Notify.init("Weather") Hello = Notify.Notification.new("Vedur.is", notification_text)