dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 075f452ec239338c3cfa484e1e093eef12b53eb9
parent 2c5d1adaae23c6298bcdf3e5cc5839f822d00ed9
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sat, 27 Jan 2018 18:44:57 -0500

Print pretty, UTF-8 chars in weather.py

Diffstat:
M.config/forecastio/weather.py | 4++--
1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/.config/forecastio/weather.py b/.config/forecastio/weather.py @@ -25,12 +25,12 @@ def generate_forecast(): current_temp = forecast.currently() day = forecast.daily() - temp = str(current_temp.temperature) + " F" + temp = str(current_temp.temperature) + "\u00b0 F" high = str(int(math.ceil(day.data[0].temperatureMax))) low = str(int(math.ceil(day.data[0].temperatureMin))) with open('current_forecast.txt', 'w') as outfile: - outfile.write(temp + ", " + str(current_temp.summary) + ", " + high +"/"+low + " F") + outfile.write(temp + ", " + str(current_temp.summary) + ", " + high +"\u00b0/"+low + "\u00b0 F") except requests.packages.urllib3.exceptions.NewConnectionError: error = True sys.stdout.writelines(datetime.now().strftime("%m/%d/%Y %I:%M:%S:") + " Could not connect. Will try again \