Numeric host name error (socket, win32)

Mikke Mattsson sprouts at
Fri Jan 16 17:05:44 CET 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, '', ('', 21))]

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

More information about the Python-list mailing list