socket.gethostname()
- The functions returns the hostname of the machine where the Python interpreter is currently executing
Example of gethostname
>>> import socket
>>> socket.gethostname()
myPC
References
Previous
Next