windows get name of current server code example Example: get hostname socket.gethostbyname(socket.gethostname())