how to determine computer name from socket object in python code example Example: get hostname socket socket.gethostbyname(socket.gethostname())