mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Merged revisions 67089,67091,67101 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk ........ r67089 | benjamin.peterson | 2008-11-03 14:43:20 -0600 (Mon, 03 Nov 2008) | 1 line clarify by splitting into multiple paragraphs ........ r67091 | benjamin.peterson | 2008-11-03 16:34:57 -0600 (Mon, 03 Nov 2008) | 1 line move a FileIO test to test_fileio ........ r67101 | georg.brandl | 2008-11-04 14:49:35 -0600 (Tue, 04 Nov 2008) | 2 lines #4167: fix markup glitches. ........
This commit is contained in:
parent
bd587059a6
commit
65676e407c
4 changed files with 23 additions and 10 deletions
|
@ -260,11 +260,15 @@ The module :mod:`socket` exports the following constants and functions:
|
|||
.. function:: gethostname()
|
||||
|
||||
Return a string containing the hostname of the machine where the Python
|
||||
interpreter is currently executing. If you want to know the current machine's IP
|
||||
address, you may want to use ``gethostbyname(gethostname())``. This operation
|
||||
assumes that there is a valid address-to-host mapping for the host, and the
|
||||
assumption does not always hold. Note: :func:`gethostname` doesn't always return
|
||||
the fully qualified domain name; use ``getfqdn()`` (see above).
|
||||
interpreter is currently executing.
|
||||
|
||||
If you want to know the current machine's IP address, you may want to use
|
||||
``gethostbyname(gethostname())``. This operation assumes that there is a
|
||||
valid address-to-host mapping for the host, and the assumption does not
|
||||
always hold.
|
||||
|
||||
Note: :func:`gethostname` doesn't always return the fully qualified domain
|
||||
name; use ``getfqdn()`` (see above).
|
||||
|
||||
|
||||
.. function:: gethostbyaddr(ip_address)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue