W
william
I've got a strange problem on windows (not very familiar with that OS).
I can ping a host, but cannot get it via urllib (see here under).
I can even telnet the host on port 80.
Thus network seems good, but not for python ;-(.
Does any windows specialist can guide me (a poor linux user) to get
Network functionalitiies with python on windows ?
I'm runnning on Windows XP (sorry to not give more, I don't know the
equivalent of uname).
I'm using standard (msi) python-2.4.2
Thanks.
test.py contains the following lines:
"
import urllib
g=urllib.urlopen('http://www.google.com')
"
C:\Temp>python test.py
Traceback (most recent call last):
File "test.py", line 2, in ?
g=urllib.urlopen('http://www.google.com')
File "c:\william\tools\python24\lib\urllib.py", line 77, in urlopen
return opener.open(url)
File "c:\william\tools\python24\lib\urllib.py", line 185, in open
return getattr(self, name)(url)
File "c:\william\tools\python24\lib\urllib.py", line 308, in
open_http
h.endheaders()
File "c:\william\tools\python24\lib\httplib.py", line 795, in
endheaders
self._send_output()
File "c:\william\tools\python24\lib\httplib.py", line 676, in
_send_output
self.send(msg)
File "c:\william\tools\python24\lib\httplib.py", line 643, in send
self.connect()
File "c:\william\tools\python24\lib\httplib.py", line 627, in connect
raise socket.error, msg
IOError: [Errno socket error] (10053, 'Software caused connection
abort')
C:\Temp>ping www.google.com
Pinging www.l.google.com [66.249.93.104] with 32 bytes of data:
Reply from 66.249.93.104: bytes=32 time=22ms TTL=246
Reply from 66.249.93.104: bytes=32 time=23ms TTL=246
Reply from 66.249.93.104: bytes=32 time=22ms TTL=246
Reply from 66.249.93.104: bytes=32 time=22ms TTL=246
Ping statistics for 66.249.93.104:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 22ms, Maximum = 23ms, Average = 22ms
I can ping a host, but cannot get it via urllib (see here under).
I can even telnet the host on port 80.
Thus network seems good, but not for python ;-(.
Does any windows specialist can guide me (a poor linux user) to get
Network functionalitiies with python on windows ?
I'm runnning on Windows XP (sorry to not give more, I don't know the
equivalent of uname).
I'm using standard (msi) python-2.4.2
Thanks.
test.py contains the following lines:
"
import urllib
g=urllib.urlopen('http://www.google.com')
"
C:\Temp>python test.py
Traceback (most recent call last):
File "test.py", line 2, in ?
g=urllib.urlopen('http://www.google.com')
File "c:\william\tools\python24\lib\urllib.py", line 77, in urlopen
return opener.open(url)
File "c:\william\tools\python24\lib\urllib.py", line 185, in open
return getattr(self, name)(url)
File "c:\william\tools\python24\lib\urllib.py", line 308, in
open_http
h.endheaders()
File "c:\william\tools\python24\lib\httplib.py", line 795, in
endheaders
self._send_output()
File "c:\william\tools\python24\lib\httplib.py", line 676, in
_send_output
self.send(msg)
File "c:\william\tools\python24\lib\httplib.py", line 643, in send
self.connect()
File "c:\william\tools\python24\lib\httplib.py", line 627, in connect
raise socket.error, msg
IOError: [Errno socket error] (10053, 'Software caused connection
abort')
C:\Temp>ping www.google.com
Pinging www.l.google.com [66.249.93.104] with 32 bytes of data:
Reply from 66.249.93.104: bytes=32 time=22ms TTL=246
Reply from 66.249.93.104: bytes=32 time=23ms TTL=246
Reply from 66.249.93.104: bytes=32 time=22ms TTL=246
Reply from 66.249.93.104: bytes=32 time=22ms TTL=246
Ping statistics for 66.249.93.104:
Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
Minimum = 22ms, Maximum = 23ms, Average = 22ms