smtpd.MailmanProxy

class smtpd.MailmanProxy(localaddr, remoteaddr) Create a new pure proxy server. Arguments are as per SMTPServer. Everything will be relayed to remoteaddr, unless local mailman configurations knows about an address, in which case it will be handled via mailman. Note that running this has a good chance to make you into an open relay, so please be careful.

http.client.HTTPConnection.putrequest()

HTTPConnection.putrequest(request, selector, skip_host=False, skip_accept_encoding=False) This should be the first call after the connection to the server has been made. It sends a line to the server consisting of the request string, the selector string, and the HTTP version (HTTP/1.1). To disable automatic sending of Host: or Accept-Encoding: headers (for example to accept additional content encodings), specify skip_host or skip_accept_encoding with non-False values.

readline.read_init_file()

readline.read_init_file([filename]) Execute a readline initialization file. The default filename is the last filename used. This calls rl_read_init_file() in the underlying library.

ipaddress.IPv4Interface.with_prefixlen

with_prefixlen A string representation of the interface with the mask in prefix notation. >>> interface = IPv4Interface('192.0.2.5/24') >>> interface.with_prefixlen '192.0.2.5/24'

logging.Handler.close()

Handler.close() Tidy up any resources used by the handler. This version does no output but removes the handler from an internal list of handlers which is closed when shutdown() is called. Subclasses should ensure that this gets called from overridden close() methods.

array.array.tounicode()

array.tounicode() Convert the array to a unicode string. The array must be a type 'u' array; otherwise a ValueError is raised. Use array.tobytes().decode(enc) to obtain a unicode string from an array of some other type.

os.get_terminal_size()

os.get_terminal_size(fd=STDOUT_FILENO) Return the size of the terminal window as (columns, lines), tuple of type terminal_size. The optional argument fd (default STDOUT_FILENO, or standard output) specifies which file descriptor should be queried. If the file descriptor is not connected to a terminal, an OSError is raised. shutil.get_terminal_size() is the high-level function which should normally be used, os.get_terminal_size is the low-level implementation. Availability: Unix, Windows.

threading.Condition.release()

release() Release the underlying lock. This method calls the corresponding method on the underlying lock; there is no return value.

calendar.month()

calendar.month(theyear, themonth, w=0, l=0) Returns a month’s calendar in a multi-line string using the formatmonth() of the TextCalendar class.

urllib.robotparser.RobotFileParser.read()

read() Reads the robots.txt URL and feeds it to the parser.