Numeric host name error (socket, win32)

Mikke Mattsson sprouts at xpress.se
Fri Jan 16 11:05:44 EST 2004


Does anoyne know how to get the socket-module to resolve numerical hostnames?

The host address is not resolved correctly.

>>> import socket
>>> socket.getaddrinfo("3100",21)
[(2, 2, 17, '', ('0.0.12.28', 21))]

If I ping the computer from a dos-prompt, I get the correct address (192.168.65.3)



More information about the Python-list mailing list