diff options
author | Jeroen Ruigrok van der Werven <asmodai@in-nomine.org> | 2009-02-19 18:52:21 (GMT) |
---|---|---|
committer | Jeroen Ruigrok van der Werven <asmodai@in-nomine.org> | 2009-02-19 18:52:21 (GMT) |
commit | 5149742e8b3c8221d4cb53dcfc9a12ae3fec9238 (patch) | |
tree | d3b7dbc021eeed177f453603f8f59f0ad01b2e0e /Doc/library/ssl.rst | |
parent | a630735b31b5ee0a1a59b3b28299e26a7ee74d9f (diff) | |
download | cpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.zip cpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.tar.gz cpython-5149742e8b3c8221d4cb53dcfc9a12ae3fec9238.tar.bz2 |
Since we recommend one module per import line, reflect this also in the
documentation.
Diffstat (limited to 'Doc/library/ssl.rst')
-rw-r--r-- | Doc/library/ssl.rst | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/ssl.rst b/Doc/library/ssl.rst index 30f1fea..572c566 100644 --- a/Doc/library/ssl.rst +++ b/Doc/library/ssl.rst @@ -481,7 +481,9 @@ 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 socket, ssl, pprint + import pprint + import socket + import ssl s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) @@ -535,7 +537,8 @@ 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, ssl + import socket + import ssl bindsocket = socket.socket() bindsocket.bind(('myaddr.mydomain.com', 10023)) |