stat.S_ISDIR()

stat.S_ISDIR(mode) Return non-zero if the mode is from a directory.

stat.S_ISCHR()

stat.S_ISCHR(mode) Return non-zero if the mode is from a character special device file.

stat.S_ISBLK()

stat.S_ISBLK(mode) Return non-zero if the mode is from a block special device file.

stat.S_IMODE()

stat.S_IMODE(mode) Return the portion of the file’s mode that can be set by os.chmod()—that is, the file’s permission bits, plus the sticky bit, set-group-id, and set-user-id bits (on systems that support them).

stat.S_IFMT()

stat.S_IFMT(mode) Return the portion of the file’s mode that describes the file type (used by the S_IS*() functions above).

stat.filemode()

stat.filemode(mode) Convert a file’s mode to a string of the form ‘-rwxrwxrwx’. New in version 3.3. Changed in version 3.4: The function supports S_IFDOOR, S_IFPORT and S_IFWHT.

ssl.wrap_socket()

ssl.wrap_socket(sock, keyfile=None, certfile=None, server_side=False, cert_reqs=CERT_NONE, ssl_version={see docs}, ca_certs=None, do_handshake_on_connect=True, suppress_ragged_eofs=True, ciphers=None) Takes an instance sock of socket.socket, and returns an instance of ssl.SSLSocket, a subtype of socket.socket, which wraps the underlying socket in an SSL context. sock must be a SOCK_STREAM socket; other socket types are unsupported. For client-side sockets, the context construction is lazy; i

ssl.SSLZeroReturnError

exception ssl.SSLZeroReturnError A subclass of SSLError raised when trying to read or write and the SSL connection has been closed cleanly. Note that this doesn’t mean that the underlying transport (read TCP) has been closed. New in version 3.3.

ssl.SSLWantWriteError

exception ssl.SSLWantWriteError A subclass of SSLError raised by a non-blocking SSL socket when trying to read or write data, but more data needs to be sent on the underlying TCP transport before the request can be fulfilled. New in version 3.3.

ssl.SSLWantReadError

exception ssl.SSLWantReadError A subclass of SSLError raised by a non-blocking SSL socket when trying to read or write data, but more data needs to be received on the underlying TCP transport before the request can be fulfilled. New in version 3.3.