diff options
Diffstat (limited to 'Doc/library/ssl.rst')
-rw-r--r-- | Doc/library/ssl.rst | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 572c5666e5..30f1fea9d1 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -481,9 +481,7 @@ Client-side operation This example connects to an SSL server, prints the server's address and certificate, sends some bytes, and reads part of the response:: - import pprint - import socket - import ssl + import socket, ssl, pprint s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) @@ -537,8 +535,7 @@ For server operation, typically you'd need to have a server certificate, and pri You'd open a socket, bind it to a port, call :meth:`listen` on it, then start waiting for clients to connect:: - import socket - import ssl + import socket, ssl bindsocket = socket.socket() bindsocket.bind(('myaddr.mydomain.com', 10023)) |