socketからIPをもらう(失敗)
>>> import socket >>> socket.gethostname() 'OLP02' >>> socket.gethostbyname(socket.gethostname()) '127.0.0.1' >>> socket.gethostbyname_ex(socket.gethostname()) ('OLP02', [], ['127.0.0.1'])
だめじゃん。
loのしか取れなかった... orz
>>> import socket >>> socket.gethostname() 'OLP02' >>> socket.gethostbyname(socket.gethostname()) '127.0.0.1' >>> socket.gethostbyname_ex(socket.gethostname()) ('OLP02', [], ['127.0.0.1'])
だめじゃん。
loのしか取れなかった... orz