how to get an ip address name code example Example: get hostname socket.gethostbyname(socket.gethostname())