summaryrefslogtreecommitdiffstats
path: root/Doc/library/socket.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-02-28 22:25:22 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-02-28 22:25:22 (GMT)
commit061cfb5258f27c895a070502d4f83a8c1a394561 (patch)
tree8c44a58404bd44a248eb2b4405c93e0faf75e834 /Doc/library/socket.rst
parent8d0f257211186de3475dd996c3a32772d2e34456 (diff)
downloadcpython-061cfb5258f27c895a070502d4f83a8c1a394561.zip
cpython-061cfb5258f27c895a070502d4f83a8c1a394561.tar.gz
cpython-061cfb5258f27c895a070502d4f83a8c1a394561.tar.bz2
Issue #10866: Add socket.sethostname(). Initial patch by Ross Lagerwall.
Diffstat (limited to 'Doc/library/socket.rst')
-rw-r--r--Doc/library/socket.rst10
1 files changed, 10 insertions, 0 deletions
diff --git a/Doc/library/socket.rst b/Doc/library/socket.rst
index 78b66e0..c456367 100644
--- a/Doc/library/socket.rst
+++ b/Doc/library/socket.rst
@@ -521,6 +521,16 @@ The module :mod:`socket` exports the following constants and functions:
meanings.
+.. function:: sethostname(name)
+
+ Set the machine's hostname to *name*. This will raise a
+ :exc:`socket.error` if you don't have enough rights.
+
+ Availability: Unix.
+
+ .. versionadded:: 3.3
+
+
.. data:: SocketType
This is a Python type object that represents the socket object type. It is the