code: def sethostname(name):
      
      # TODO: replace with socket.sethostname, which is available from Python 3.3
      name = name.encode()
      _libc.sethostname(name, len(name))
docs: Set the host name of the machine.