socket.socket.connect()

socket.connect(address) Connect to a remote socket at address. (The format of address depends on the address family — see above.) If the connection is interrupted by a signal, the method waits until the connection completes, or raise a socket.timeout on timeout, if the signal handler doesn’t raise an exception and the socket is blocking or has a timeout. For non-blocking sockets, the method raises an InterruptedError exception if the connection is interrupted by a signal (or the exception ra

asyncio.Protocol.eof_received()

Protocol.eof_received() Calls when the other end signals it won’t send any more data (for example by calling write_eof(), if the other end also uses asyncio). This method may return a false value (including None), in which case the transport will close itself. Conversely, if this method returns a true value, closing the transport is up to the protocol. Since the default implementation returns None, it implicitly closes the connection. Note Some transports such as SSL don’t support half-clos

signal.pthread_sigmask()

signal.pthread_sigmask(how, mask) Fetch and/or change the signal mask of the calling thread. The signal mask is the set of signals whose delivery is currently blocked for the caller. Return the old signal mask as a set of signals. The behavior of the call is dependent on the value of how, as follows. SIG_BLOCK: The set of blocked signals is the union of the current set and the mask argument. SIG_UNBLOCK: The signals in mask are removed from the current set of blocked signals. It is permiss

zipfile.ZipFile.extract()

ZipFile.extract(member, path=None, pwd=None) Extract a member from the archive to the current working directory; member must be its full name or a ZipInfo object. Its file information is extracted as accurately as possible. path specifies a different directory to extract to. member can be a filename or a ZipInfo object. pwd is the password used for encrypted files. Returns the normalized path created (a directory or new file). Note If a member filename is an absolute path, a drive/UNC share

email.utils.parseaddr()

email.utils.parseaddr(address) Parse address – which should be the value of some address-containing field such as To or Cc – into its constituent realname and email address parts. Returns a tuple of that information, unless the parse fails, in which case a 2-tuple of ('', '') is returned.

uuid.UUID.fields

UUID.fields A tuple of the six integer fields of the UUID, which are also available as six individual attributes and two derived attributes: Field Meaning time_low the first 32 bits of the UUID time_mid the next 16 bits of the UUID time_hi_version the next 16 bits of the UUID clock_seq_hi_variant the next 8 bits of the UUID clock_seq_low the next 8 bits of the UUID node the last 48 bits of the UUID time the 60-bit timestamp clock_seq the 14-bit sequence number

iter()

iter(object[, sentinel]) Return an iterator object. The first argument is interpreted very differently depending on the presence of the second argument. Without a second argument, object must be a collection object which supports the iteration protocol (the __iter__() method), or it must support the sequence protocol (the __getitem__() method with integer arguments starting at 0). If it does not support either of those protocols, TypeError is raised. If the second argument, sentinel, is give

argparse.ArgumentParser.error()

ArgumentParser.error(message) This method prints a usage message including the message to the standard error and terminates the program with a status code of 2.

os.statvfs()

os.statvfs(path) Perform a statvfs() system call on the given path. The return value is an object whose attributes describe the filesystem on the given path, and correspond to the members of the statvfs structure, namely: f_bsize, f_frsize, f_blocks, f_bfree, f_bavail, f_files, f_ffree, f_favail, f_flag, f_namemax. Two module-level constants are defined for the f_flag attribute’s bit-flags: if ST_RDONLY is set, the filesystem is mounted read-only, and if ST_NOSUID is set, the semantics of se

collections.somenamedtuple._asdict()

somenamedtuple._asdict() Return a new OrderedDict which maps field names to their corresponding values: >>> p = Point(x=11, y=22) >>> p._asdict() OrderedDict([('x', 11), ('y', 22)]) Changed in version 3.1: Returns an OrderedDict instead of a regular dict.