0001 ## AHH - I cant make this work!!! 0002 0003 # But this is the general idea. 0004 0005 import netscape 0006 import sys 0007 0008 error = "Netscape Test Error" 0009 0010 if __name__=='__main__': 0011 n=netscape.CNetworkCX() 0012 rc = n.Open("http://d|/temp/apyext.html", 0, None, 0, None) 0013 if not rc: raise error, "Open method of Netscape failed" 0014 while 1: 0015 num, str = n.Read(None, 0) 0016 print "Got ", num, str 0017 if num==0: 0018 break # used to be continue - no idea!! 0019 if num==-1: 0020 break 0021 # sys.stdout.write(str) 0022 n.Close() 0023 print "Done!" 0024 del n 0025 sys.last_type = sys.last_value = sys.last_traceback = None 0026
Generated by PyXR 0.9.4