someone at microsoft.com
Wed Mar 20 00:08:06 CET 2002
You are both right. It does work. It has to be a typo or the way that I am
passing the host value into the program.
"Oleg Broytmann" <phd at phd.pp.ru> wrote in message
news:mailman.1016544391.11261.python-list at python.org...
> 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
> > type "theodore.chipmunks.com" and that I would get back an IP address as
> > doted quad. Obviously I am wrong about the form of the arguement I am
> > 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")
> 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