how to get ip from hostname windows code example Example: get hostname socket.gethostbyname(socket.gethostname())