socket.gethostbyname() AttributeError
Oleg Broytmann
phd at phd.pp.ru
Tue Mar 19 08:24:24 EST 2002
On Tue, Mar 19, 2002 at 01:12:58PM +0000, Ralph wrote:
> I assumed that for scoket.gethostbyname(host), I was to pass a host of the
> type "theodore.chipmunks.com" and that I would get back an IP address as a
> doted quad. Obviously I am wrong about the form of the arguement I am to
> pass to the function, because I am getting an AttributeError message.
>
> Can anyone offer some insight?
Python 2.2 (#1, Dec 24 2001, 17:25:15)
[GCC 2.95.2 20000220 (Debian GNU/Linux)] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import socket
>>> socket.gethostbyname("www.python.org")
'194.109.137.226'
Oleg.
--
Oleg Broytmann http://phd.pp.ru/ phd at phd.pp.ru
Programmers don't die, they just GOSUB without RETURN.
More information about the Python-list
mailing list