Re: socket.gethostbyaddr problem

2005-09-17 Thread Irmen de Jong
Mohammed Smadi wrote: > hi; > I am trying to do some very basic socket programming and i get the > following error. Any help will be appreciated: > > Code: > import socket > x = socket.gethostbyaddr("www.google.ca") > > return an error: socket.herror: (1, 'Unknown host') You're using the wrong

Re: socket.gethostbyaddr problem

2005-09-17 Thread jepler
Perhaps you mean to use the function socket.gethostbyname instead. >>> import socket >>> socket.gethostbyaddr("www.google.ca") Traceback (most recent call last): File "", line 1, in ? socket.herror: (1, 'Unknown host') >>> socket.gethostbyname("www.google.ca") '64.233.167.147' Jeff pgpsZ1m3Oc

socket.gethostbyaddr problem

2005-09-17 Thread Mohammed Smadi
hi; I am trying to do some very basic socket programming and i get the following error. Any help will be appreciated: Code: import socket x = socket.gethostbyaddr("www.google.ca") return an error: socket.herror: (1, 'Unknown host') I tried replacing the web URL with an IP address on the net, o