diff --git a/tgetwx.py b/tgetwx.py index c0ceb57..d4e6961 100755 --- a/tgetwx.py +++ b/tgetwx.py @@ -3,11 +3,11 @@ # Copyright (c) 2014 TundraWare Inc., Des Plaines, IL 60018 USA # All Rights Reserved. For Terms Of Use See: tgetwx-license.txt # For Program Updates See: http://www.tundraware.com/Software/tgetwx -# $Id: tgetwx.py,v 1.102 2014/02/20 00:19:10 tundra Exp $ +# $Id: tgetwx.py,v 1.103 2014/03/04 00:58:38 tundra Exp $ # Embed the source control ID string for use by program -CVSID='$Id: tgetwx.py,v 1.102 2014/02/20 00:19:10 tundra Exp $' +CVSID='$Id: tgetwx.py,v 1.103 2014/03/04 00:58:38 tundra Exp $' ##### # Program Information @@ -216,12 +216,12 @@ results.append(data["sys"]["country"]) results.append(data["dt"]) - results.append(str((data["main"]["temp"] - KELVIN) * (9/5) + 32) + "F") - results.append(str(data["main"]["humidity"])+ "%") - results.append(str(data["main"]["pressure"] * 0.0295299830714) + "in") - results.append(str(data["wind"]["speed"]) + "mph") - results.append(str(data["wind"]["deg"]) + "deg") - results.append(str(data["clouds"]["all"]) + "%") + results.append("%.0f" % (((data["main"]["temp"] - KELVIN) * 9/5) + 32) + "F" ) + results.append("%.0f" % (data["main"]["humidity"])+ "%") + results.append("%.2f" % (data["main"]["pressure"] * 0.0295299830714) + "in") + results.append("%.1f" % (data["wind"]["speed"]) + "mph") + results.append("%.0f" % (data["wind"]["deg"]) + "deg") + results.append("%.0f" % (data["clouds"]["all"]) + "%") results.append(data["weather"][0]["description"]) @@ -274,5 +274,4 @@ # Command line arguments are presumed to be locations to lookup for location in args: - ReportWeather(location, HTMLOUT)