Retrive the extended forecast from Wunderground Weather API in python

I signed up for the Wunderground API Key and needed a script to grab the extended forecast.

#!/usr/bin/env python
import urllib2
import json
wurl = urllib2.urlopen("http://api.wunderground.com/api/<your-key-here>/forecast/q/TX/KSAT.json")
json_string = wurl.read()
parsed_json = json.loads(json_string)
for data in parsed_json['forecast']['simpleforecast']['forecastday']:
    print data['date']['weekday'] + ':'
    print data['conditions']
    print "Highs:", data['high']['fahrenheit'], "Lows:", data['low']['fahrenheit'], "\n", data['pop'], "% Chance of rain \n"
wurl.close()

Install Medibuntu in Quantal Ubuntu 12.10

Medibuntu (Multimedia, Entertainment & Distractions In Ubuntu) is a repository of packages that cannot be included into the Ubuntu distribution for legal reasons (copyright, license, patent, etc).

Let’s include the repository to our sources list directory:

sudo wget http://www.medibuntu.org/sources.list.d/$(lsb_release -cs).list --output-document=/etc/apt/sources.list.d/medibuntu.list; sudo apt-get update

Now we can install Medibuntu’s GPG key to our keyring:

sudo apt-get --yes -q --allow-unauthenticated install medibuntu-keyring; sudo apt-get update

Now let’s install the goodness:

sudo apt-get install non-free-codecs