socket.gethostbyaddr( os.environ['REMOTE_ADDR'] error
Chris Angelico
rosuav at gmail.com
Mon Jan 9 21:08:35 EST 2012
On Tue, Jan 10, 2012 at 10:32 AM, Nick Dokos <nicholas.dokos at hp.com> wrote:
> Chris Angelico <rosuav at gmail.com> wrote:
>> Point to note: The inverse operation, getting IP addresses from names,
>
> so socket.gethostbyaddr(os.environ['REMOTE_ADDR'])[0] is the 0th element
> of the tuple, i.e. the *name* that is returned.
Correct, I was drawing a noteworthy parallel with the inverse - gethostbyname.
ChrisA
More information about the Python-list
mailing list