Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Shorten code #9

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 3 additions & 8 deletions RaspberryPi/python/examples/Show_CN_Weather.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,7 @@
from Weather import Get_CN_Weather
import time

from PIL import Image
from PIL import ImageDraw
from PIL import ImageFont
from PIL import ImageColor
from PIL import Image, ImageDraw, ImageFont, ImageColor

from PIL import Image

Expand All @@ -37,8 +34,7 @@
import epd12in48
print ('epd12in48')
Color_Type = 1
Inage_WIDTH = epd12in48.EPD_WIDTH
Inage_HEIGHT = epd12in48.EPD_HEIGHT
Inage_WIDTH, InageHEIGHT = epd12in48.EPD_WIDTH, epd12in48.EPD_HEIGHT
epd = epd12in48.EPD()

elif(sys.argv[1] == 'help' or sys.argv[1] == 'HELP'):
Expand All @@ -52,8 +48,7 @@
import epd12in48b
print ('epd12in48b')
Color_Type = 2
Inage_WIDTH = epd12in48b.EPD_WIDTH
Inage_HEIGHT = epd12in48b.EPD_HEIGHT
Inage_WIDTH, Inage_HEIGHT = epd12in48b.EPD_WIDTH, epd12in48b.EPD_HEIGHT
epd = epd12in48b.EPD()

Blackimage = Image.new("1", (Inage_WIDTH, Inage_HEIGHT), 255)
Expand Down