if __name__ == '__main__':
    '''
  Query api for json outputs of current & extended
  weather & their respective reformatted outputs
  for use in scene.
  '''
    json_w, json_f, w, f = get_weather()

    # Format extended forecast & plot scene coordinates to display it
    txt_wrapped_f, icon_y, y1_y2 = format_plot_weather(f)

    # Current weather info for scene header
    city_name, temp_now, conditions = wa.get_scene_header(json_w)

    # Get icons & 24 hr weather data for scene
    the_icons, the_hours, the_temps, the_pops = wa.get_icons_24h_data(
        json_w, json_f, icon_path)

    # Check for any missing icons before scene runs
    check_icons(the_icons, icon_path)

    # Debug
    #for ys in y1_y2:
    #print ys
    #for ys in icon_y:
    #print ys
    #sys.exit()

    #MyScene()
    SceneViewer(MyScene())

# - **WeatherAnywhereScene.py** - Inspiration behind this was @cclauss's script, [WeatherAnywhereView.py](https://github.com/coomlata1/pythonista-scripts/blob/master/wa_open_weather_map/WeatherAnywhereView.py) in this repository. I wanted to be able to add weather icons and have them scroll with the text, so a scene seemed to be the best answer. This script gives a much better representation of the weather info than the console version does. It displays the current weather, weather for the next 24 hrs, weather for the next 7 days, and buttons on the title bar for viewing the weather on the web and weather alerts for the region.  The script uses the functions in 'WeatherAnywhere.py' to retrieve the necessary weather info displayed.  The script allows scrolling the scene by inertia.  A basic scrolling example was created by Dalorbi on the [pythonista forums](http://omz-forums.appspot.com/pythonista/post/4998190881308672). Ability for scrolling the scene with inertia was added by [hroe](https://gist.github.com/henryroe/6724117). This script needs to be placed in the same folder as WeatherAnywhere.py, to make use of some of it's functions. The script also uses the weather icons stored in a subfolder '/icons' off the script folder.
'''
Query api for json outputs of current & extended
weather & their respective reformatted outputs for
use in scene
'''
json_w, json_f, w, f = get_weather()

# Format extended forecast & plot scene coordinates to display it
txt_wrapped_f, icon_y, y1_y2 = format_plot_weather(f)

# Current weather info for scene header
city_name, temp_now, conditions = wa.get_scene_header(json_w)

# Get icons & 24 hr weather data for scene
the_icons, the_hours, the_temps, the_pops = wa.get_icons_24h_data(json_w, json_f, icon_path)

# Check for any missing icons before scene runs
check_icons(the_icons, icon_path)

# Debug
#for ys in y1_y2:
  #print ys
#for ys in icon_y:
  #print ys
#sys.exit()

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