1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22
| >>> import urllib
>>> urllib.urlretrieve('http://python.developpez.com/outils/PythonZope/images/cpython.gif', 'z:/cpython.gif')
Traceback (most recent call last):
File "<pyshell#1>", line 1, in <module>
urllib.urlretrieve('http://python.developpez.com/outils/PythonZope/images/cpython.gif', 'z:/cpython.gif')
File "Z:\python25\lib\urllib.py", line 89, in urlretrieve
return _urlopener.retrieve(url, filename, reporthook, data)
File "Z:\python25\lib\urllib.py", line 222, in retrieve
fp = self.open(url, data)
File "Z:\python25\lib\urllib.py", line 190, in open
return getattr(self, name)(url)
File "Z:\python25\lib\urllib.py", line 325, in open_http
h.endheaders()
File "Z:\python25\lib\httplib.py", line 860, in endheaders
self._send_output()
File "Z:\python25\lib\httplib.py", line 732, in _send_output
self.send(msg)
File "Z:\python25\lib\httplib.py", line 699, in send
self.connect()
File "Z:\python25\lib\httplib.py", line 683, in connect
raise socket.error, msg
IOError: [Errno socket error] (10061, 'Connection refused') |
Partager