XML Processing Modules

Source code: Lib/xml/ Python’s interfaces for processing XML are grouped in the xml package. Warning The XML modules are not secure against erroneous or maliciously constructed data. If you need to parse untrusted or unauthenticated data see the XML vulnerabilities and The defusedxml and defusedexpat Packages sections. It is important to note that modules in the xml package require that there be at least one SAX-compliant XML parser available. The Expat parser is included with Python, so the

ipaddress.IPv4Network

class ipaddress.IPv4Network(address, strict=True) Construct an IPv4 network definition. address can be one of the following: A string consisting of an IP address and an optional mask, separated by a slash (/). The IP address is the network address, and the mask can be either a single number, which means it’s a prefix, or a string representation of an IPv4 address. If it’s the latter, the mask is interpreted as a net mask if it starts with a non-zero field, or as a host mask if it starts wit

email.utils.parsedate()

email.utils.parsedate(date) Attempts to parse a date according to the rules in RFC 2822. however, some mailers don’t follow that format as specified, so parsedate() tries to guess correctly in such cases. date is a string containing an RFC 2822 date, such as "Mon, 20 Nov 1995 19:12:08 -0500". If it succeeds in parsing the date, parsedate() returns a 9-tuple that can be passed directly to time.mktime(); otherwise None will be returned. Note that indexes 6, 7, and 8 of the result tuple are not

urllib.error.URLError.reason

reason The reason for this error. It can be a message string or another exception instance.

pipes.Template.debug()

Template.debug(flag) If flag is true, turn debugging on. Otherwise, turn debugging off. When debugging is on, commands to be executed are printed, and the shell is given set -x command to be more verbose.

curses.nonl()

curses.nonl() Leave newline mode. Disable translation of return into newline on input, and disable low-level translation of newline into newline/return on output (but this does not change the behavior of addch('\n'), which always does the equivalent of return and line feed on the virtual screen). With translation off, curses can sometimes speed up vertical motion a little; also, it will be able to detect the return key on input.

email.message.Message.get_params()

get_params(failobj=None, header='content-type', unquote=True) Return the message’s Content-Type parameters, as a list. The elements of the returned list are 2-tuples of key/value pairs, as split on the '=' sign. The left hand side of the '=' is the key, while the right hand side is the value. If there is no '=' sign in the parameter the value is the empty string, otherwise the value is as described in get_param() and is unquoted if optional unquote is True (the default). Optional failobj is

subprocess.CalledProcessError.returncode

returncode Exit status of the child process. If the process exited due to a signal, this will be the negative signal number.

sqlite3.version_info

sqlite3.version_info The version number of this module, as a tuple of integers. This is not the version of the SQLite library.

http.cookiejar.DefaultCookiePolicy.rfc2109_as_netscape

DefaultCookiePolicy.rfc2109_as_netscape If true, request that the CookieJar instance downgrade RFC 2109 cookies (ie. cookies received in a Set-Cookie header with a version cookie-attribute of 1) to Netscape cookies by setting the version attribute of the Cookie instance to 0. The default value is None, in which case RFC 2109 cookies are downgraded if and only if RFC 2965 handling is turned off. Therefore, RFC 2109 cookies are downgraded by default.