Seite 1 von 1

Win XP Proxy benutzen

Verfasst: Freitag 18. November 2011, 15:13
von Kebap
Hi, ein Freund von mir möchte gerne Python unter Windows XP benutzen, aber es funktioniert nicht. Ich denke, es liegt daran, weil er hinter einem Proxy ist. Python müsste die Proxy Einstellungen benutzen, aber dies geht vermutlich schief. Die Fehlermeldung hilft mir auch kaum:

Code: Alles auswählen

>>> import urllib2
>>> response = urllib2.urlopen("http://google.com")
Traceback (most recent call last):
  File "<interactive input>", line 1, in <module>
  File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 126, in urlopen
    return _opener.open(url, data, timeout)
  File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 394, in open
    response = self._open(req, data)
  File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 412, in _open
    '_open', req)
  File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 1199, in http_open
    return self.do_open(httplib.HTTPConnection, req)
  File "Portable Python 2.7.2.1\App\lib\urllib2.py", line 1174, in do_open
    raise URLError(err)
URLError: <urlopen error [Errno 11004] getaddrinfo failed>