[code.view]

[top] / python / PyMOTW / socket / socket_gethostname.py

     #!/usr/bin/env python
     # encoding: utf-8
     #
     # Copyright (c) 2010 Doug Hellmann.  All rights reserved.
     #
     """Look up the name of the current host
     """
     #end_pymotw_header
     
     import socket
     
     print socket.gethostname()
     

[top] / python / PyMOTW / socket / socket_gethostname.py

contact | logmethods.com