urllib fails to connect

2008-08-20 Thread jlist
I'm running ActiveState Python 2.5 on Windows XP. It used to work fine. Today however I get (10061, 'Connection refused') for any site I try with urllib.urlopen(). -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib fails to connect

2008-08-20 Thread jlist
I found out why. I set a proxy in IE and I didn't know ActiveState Python use IE proxy! I'm running ActiveState Python 2.5 on Windows XP. It used to work fine. Today however I get (10061, 'Connection refused') for any site I try with urllib.urlopen(). --

Re: urllib fails to connect

2008-08-20 Thread raashid bhatt
On Aug 20, 10:06 am, jlist [EMAIL PROTECTED] wrote: I'm running ActiveState Python 2.5 on Windows XP. It used to work fine. Today however I get (10061, 'Connection refused') for any site I try with urllib.urlopen(). May be the host is Listening on the port you are connecting to or the host

Re: urllib fails to connect

2008-08-20 Thread Trent Mick
jlist wrote: I found out why. I set a proxy in IE and I didn't know ActiveState Python use IE proxy! I'm running ActiveState Python 2.5 on Windows XP. It used to work fine. Today however I get (10061, 'Connection refused') for any site I try with urllib.urlopen(). Perhaps IE's proxy settings

Re: urllib fails to connect

2008-08-20 Thread jlist
My guess is urllib.urlopen() wraps the wininet calls, which share IE proxy settings. Perhaps IE's proxy settings are effectively setting the Windows system networking proxy settings? -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib fails to connect

2008-08-20 Thread Fredrik Lundh
jlist wrote: My guess is urllib.urlopen() wraps the wininet calls, which share IE proxy settings. urllib doesn't use wininet, but it does fetch the proxy settings from the Windows registry. /F -- http://mail.python.org/mailman/listinfo/python-list

Re: urllib fails to connect

2008-08-20 Thread Edwin . Madari
jlist wrote: I found out why. I set a proxy in IE and I didn't know ActiveState Python use IE proxy! I'm running ActiveState Python 2.5 on Windows XP. It used to work fine. Today however I get (10061, 'Connection refused') for any site I try with urllib.urlopen(). switching to

Re: urllib fails to connect

2008-08-20 Thread jlist
Thanks. My problem was not how to use a proxy server but how to not use the IE proxy :) BTW, I'm not a fan of the way urllib2 uses a proxy particularly. I think it's really unneccesarily complicated. I think it should be something like this: def urlopen(url, proxy='') And if you want to use a