i want to get the local private machine's address, running the following piece of code:
socket.gethostbyaddr(socket.gethostname())
gives the error:
socket.herror: [Errno 2] Host name lookup failure
i know i can see local machine's address, by using
socket.gethostbyname(socket.gethostname())
but it shows the public address of my network (or machine) and ifcofig shows another address for my wlan. can some one help me on this issue? Thanks
NameError), that doesn't seem to be the issue here.