localisation ip code example Example: local ip Click to copyhostname = socket.gethostname() local_ip = socket.gethostbyname(hostname)