The OpenWeatherMap service provides open weather data for more than 200,000 cities and any geo location that is available on their website and through their API.
Using their service requires registration where you can get your API key.
The above script requires requests
$ apt-get install python-pip
$ pip install requests
Tested on
- Debian 7.8 (wheezy) with Python 2.7.3
- Mac OS X Yosemite 10.10.2 with Python 2.7.6