From e704ab69c869279f814a5547cca8aa98a150c47e Mon Sep 17 00:00:00 2001 From: Fredrick W Warren Date: Thu, 5 May 2022 12:45:34 -0700 Subject: [PATCH] added , to number formatting --- solar_edge.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/solar_edge.py b/solar_edge.py index c39daba..5defd40 100755 --- a/solar_edge.py +++ b/solar_edge.py @@ -52,8 +52,8 @@ image = Image.open(bundle_dir + "/" + infile) font = ImageFont.truetype(bundle_dir + "/" + font_face, 19) draw = ImageDraw.Draw(image) -draw.text((xpos, line1), str(co2)+" lbs", font=font, fill=fill_color) -draw.text((xpos, line2), str(trees), font=font, fill=fill_color) +draw.text((xpos, line1), "{:,} lbs".format(co2) , font=font, fill=fill_color) +draw.text((xpos, line2), "{:,}".format(trees), font=font, fill=fill_color) image.save(outfile)