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