def runTest(self): try: f = Fetch("http://tga.plu.cn") if f.connected: f.read() print f.getCharset(), f.getCode(), f.isReady() except Exception, e: print e