how to check host name from computer code example Example: get hostname socket.gethostbyname(socket.gethostname())