Feeds:
Posts
Comments

Posts Tagged ‘xml’

Here is a script to provide weather information of a city with the help of google api.

#!/usr/bin/python
#Rag Sagar <ragsagar @gmail.com>
#Free to copy, modify and redistribute

import sys
from urllib2 import urlopen, URLError
from xml.sax import make_parser
from xml.sax.handler import ContentHandler

class WeatherFinder(ContentHandler):
"""the handler class"""
def __init__(self):
self.weather_list = []
self.go_on = False

def startElement(self, tag, attrs):
"handles the opening tags"
if tag == ‘current_conditions’:
self.go_on = True
if [...]

Read Full Post »