pythonでホスト名取得

import socket
hostname = socket.gethostname()