Luckily there’s a wonderful python module to extract data from three popular weather services; python-weather-api supports NOAA, Yahoo! Weather and weather.com. This makes life so much easier.
Download the module and install in the usual way; there are instructions in their wiki.
A simple way to display the raw data in a more readable form is to use Pretty Print (pprint) which is installed by default on Respbian. Just change the code in the call to weather.com in the script below to your town which can be found in the URL if you use the weather.com web page….
Featured Adafruit Product!
PiTFT Mini Kit – 320×240 2.8″ TFT+Touchscreen for Raspberry Pi: Limit 100 per customer, orders cannot be combined. Limited supply available. Is this not the cutest little display for the Raspberry Pi? It features a 2.8″ display with 320×240 16-bit color pixels and a resistive touch overlay. The plate uses the high speed SPI interface on the Pi and can use the mini display as a console, X window port, displaying images or video etc. Best of all it plugs right in on top! … (read more)
Each Friday is PiDay here at Adafruit! Be sure to check out our posts, tutorials and new Raspberry Pi related products. Adafruit has the largest and best selection of Raspberry Pi accessories and all the code & tutorials to get you up and running in no time!