I am using in my python scripts the following in order to find the host name
import socket
host = socket.gethostname()
or
local_fqdn = socket.getfqdn(socket.gethostname())
etc
the question is if its necessary to close the socket after above code?
as
s.shutdown(socket.SHUT_RDWR)
s.close()
or
if socket_:
socket_.close()
1