Issue #10866: Add socket.sethostname(). Initial patch by Ross Lagerwall.

This commit is contained in:
Antoine Pitrou 2011-02-28 22:25:22 +00:00
parent 8d0f257211
commit 061cfb5258
7 changed files with 82 additions and 12 deletions

View file

@ -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