Example #1
0
def download(id):
    if isinstance(id,int):
        return xml.cls(get(url(id)).text)
    else:
        raise TypeError("download(int) expected")
Example #2
0
def load(f="~/Downloads/forecast.xml"):
    return xml.cls(codecs.open(f,"r","ISO-8859-1").read())