def check_icons(icons, path):
  # Loop list of needed icons
  for icon in icons:
  # Check if we have them
    if os.path.exists(icon):
      continue
    # If any are missing then download what icons are needed
    print('=' * 20)
    wa.download_weather_icons(path)
def check_icons(icons, path):
    # Loop list of needed icons
    for icon in icons:
        # Check if we have them
        if os.path.exists(icon):
            continue
        # If any are missing then download what icons are needed
        print('=' * 20)
        wa.download_weather_icons(path)
Exemplo n.º 3
0
  sys.exit('Weather servers are busy. Try again in a few minutes...')

weather_now = get_weather_now(w)
forecast = get_forecast(f)
icon_path = './icons/'
weather_icons = get_icons(w,f, icon_path)

# Loop list of needed icons
for icon in weather_icons:
  # Check if we have them
  if os.path.exists(icon):
    continue
  # If missing then download what
  # icons are needed
  print('=' * 20)
  wa.download_weather_icons(icon_path)

# Y coordinates for placement of icons
y = [180,-20,-155,-292,-430,-568,-705,-845]

class MyScene (scene.Scene):
  def __init__(self):
    scene.run(self)

  def setup(self):
    self.dx = self.size.w / 2
    self.dy = self.size.h / 2 + 10
    self.xy_velocity = None
    self.velocity_decay_timescale_seconds = 0.4
    self.max_retained_touch_points = 6
    self.min_velocity_points_per_second = 50