How use urllib.urlopen()?

Alex Martelli aleaxit at yahoo.com
Fri Dec 22 03:53:41 EST 2000


"Gustaf Liljegren" <gustafl at algonet.se> wrote in message
news:9012313F4gustaflalgonetse at 194.213.69.148...
> Can't get the urlopen() function to work. I have a script on a UNIX web
> server that should go to another webpage when the user clicks a button. To
> isolate the problem, I made a test script:
>
> #!/usr/local/bin/python
>
> import urllib
> u = urllib.urlopen("http://www.yahoo.com")
> print u.read()
>
> When running this I get HTTP 500 - Internal server error. :-(
>
> What's missing?

This script works fine for me if I run it on a machine outside
our firewall.  Are there perhaps proxy/firewall issues with
your "UNIX web server"'s configuration/settings...?  Seems one
likely explanation.


Alex






More information about the Python-list mailing list