Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

testNetscape.py 660B

123456789101112131415161718192021222324252627
  1. ## AHH - I cant make this work!!!
  2. # But this is the general idea.
  3. import sys
  4. import netscape
  5. error = "Netscape Test Error"
  6. if __name__ == "__main__":
  7. n = netscape.CNetworkCX()
  8. rc = n.Open("http://d|/temp/apyext.html", 0, None, 0, None)
  9. if not rc:
  10. raise error("Open method of Netscape failed")
  11. while 1:
  12. num, str = n.Read(None, 0)
  13. print("Got ", num, str)
  14. if num == 0:
  15. break # used to be continue - no idea!!
  16. if num == -1:
  17. break
  18. # sys.stdout.write(str)
  19. n.Close()
  20. print("Done!")
  21. del n
  22. sys.last_type = sys.last_value = sys.last_traceback = None