python code to obtain computer name on the network code example Example: get hostname socket socket.gethostbyname(socket.gethostname())