neulab/docprompting-conala huggingface dataset:
xml.sax.make_parser(parser_list=[])  
Create and return a SAX XMLReader object. The first parser found will be used. If parser_list is provided, it must be an iterable of strings which name modules that have a function named create_parser(). Modules listed in parser_list will be used before modules in the default list of parsers.  Changed in version 3.8: The parser_list argument can be any iterable, not just a list.
xml.sax.parse(filename_or_stream, handler, error_handler=handler.ErrorHandler())  
Create a SAX parser and use it to parse a document. The document, passed in as filename_or_stream, can be a filename or a file object. The handler parameter needs to be a SAX ContentHandler instance. If error_handler is given, it must be a SAX ErrorHandler instance; if omitted, SAXParseException will be raised on all errors. There is no return value; all work must be done by the handler passed in.
xml.sax.parseString(string, handler, error_handler=handler.ErrorHandler())  
Similar to parse(), but parses from a buffer string received as a parameter. string must be a str instance or a bytes-like object.  Changed in version 3.5: Added support of str instances.
exception xml.sax.SAXException(msg, exception=None)  
Encapsulate an XML error or warning. This class can contain basic error or warning information from either the XML parser or the application: it can be subclassed to provide additional functionality or to add localization. Note that although the handlers defined in the ErrorHandler interface receive instances of this exception, it is not required to actually raise the exception — it is also useful as a container for information. When instantiated, msg should be a human-readable description of the error. The optional exception parameter, if given, should be None or an exception that was caught by the parsing code and is being passed along as information. This is the base class for the other SAX exception classes.
exception xml.sax.SAXNotRecognizedException(msg, exception=None)  
Subclass of SAXException raised when a SAX XMLReader is confronted with an unrecognized feature or property. SAX applications and extensions may use this class for similar purposes.
exception xml.sax.SAXNotSupportedException(msg, exception=None)  
Subclass of SAXException raised when a SAX XMLReader is asked to enable a feature that is not supported, or to set a property to a value that the implementation does not support. SAX applications and extensions may use this class for similar purposes.
exception xml.sax.SAXParseException(msg, exception, locator)  
Subclass of SAXException raised on parse errors. Instances of this class are passed to the methods of the SAX ErrorHandler interface to provide information about the parse error. This class supports the SAX Locator interface as well as the SAXException interface.
xml.sax.saxutils.escape(data, entities={})  
Escape '&', '<', and '>' in a string of data. You can escape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. The characters '&', '<' and '>' are always escaped, even if entities is provided.
xml.sax.saxutils.prepare_input_source(source, base='')  
This function takes an input source and an optional base URL and returns a fully resolved InputSource object ready for reading. The input source can be given as a string, a file-like object, or an InputSource object; parsers will use this function to implement the polymorphic source argument to their parse() method.
xml.sax.saxutils.quoteattr(data, entities={})  
Similar to escape(), but also prepares data to be used as an attribute value. The return value is a quoted version of data with any additional required replacements. quoteattr() will select a quote character based on the content of data, attempting to avoid encoding any quote characters in the string. If both single- and double-quote characters are already in data, the double-quote characters will be encoded and data will be wrapped in double-quotes. The resulting string can be used directly as an attribute value: >>> print("<element attr=%s>" % quoteattr("ab ' cd \" ef"))
<element attr="ab ' cd &quot; ef">
 This function is useful when generating attribute values for HTML or any SGML using the reference concrete syntax.
xml.sax.saxutils.unescape(data, entities={})  
Unescape '&amp;', '&lt;', and '&gt;' in a string of data. You can unescape other strings of data by passing a dictionary as the optional entities parameter. The keys and values must all be strings; each key will be replaced with its corresponding value. '&amp', '&lt;', and '&gt;' are always unescaped, even if entities is provided.
class xml.sax.saxutils.XMLFilterBase(base)  
This class is designed to sit between an XMLReader and the client application’s event handlers. By default, it does nothing but pass requests up to the reader and events on to the handlers unmodified, but subclasses can override specific methods to modify the event stream or the configuration requests as they pass through.
class xml.sax.saxutils.XMLGenerator(out=None, encoding='iso-8859-1', short_empty_elements=False)  
This class implements the ContentHandler interface by writing SAX events back into an XML document. In other words, using an XMLGenerator as the content handler will reproduce the original document being parsed. out should be a file-like object which will default to sys.stdout. encoding is the encoding of the output stream which defaults to 'iso-8859-1'. short_empty_elements controls the formatting of elements that contain no content: if False (the default) they are emitted as a pair of start/end tags, if set to True they are emitted as a single self-closed tag.  New in version 3.2: The short_empty_elements parameter.
Attributes.getType(name)  
Returns the type of the attribute name, which is normally 'CDATA'.
class xml.sax.xmlreader.AttributesImpl(attrs)  
This is an implementation of the Attributes interface (see section The Attributes Interface). This is a dictionary-like object which represents the element attributes in a startElement() call. In addition to the most useful dictionary operations, it supports a number of other methods as described by the interface. Objects of this class should be instantiated by readers; attrs must be a dictionary-like object containing a mapping from attribute names to attribute values.
AttributesNS.getNameByQName(name)  
Return the (namespace, localname) pair for a qualified name.
AttributesNS.getQNameByName(name)  
Return the qualified name for a (namespace, localname) pair.
AttributesNS.getValueByQName(name)  
Return the value for a qualified name.
class xml.sax.xmlreader.AttributesNSImpl(attrs, qnames)  
Namespace-aware variant of AttributesImpl, which will be passed to startElementNS(). It is derived from AttributesImpl, but understands attribute names as two-tuples of namespaceURI and localname. In addition, it provides a number of methods expecting qualified names as they appear in the original document. This class implements the AttributesNS interface (see section The AttributesNS Interface).
class xml.sax.xmlreader.IncrementalParser  
In some cases, it is desirable not to parse an input source at once, but to feed chunks of the document as they get available. Note that the reader will normally not read the entire file, but read it in chunks as well; still parse() won’t return until the entire document is processed. So these interfaces should be used if the blocking behaviour of parse() is not desirable. When the parser is instantiated it is ready to begin accepting data from the feed method immediately. After parsing has been finished with a call to close the reset method must be called to make the parser ready to accept new data, either from feed or using the parse method. Note that these methods must not be called during parsing, that is, after parse has been called and before it returns. By default, the class also implements the parse method of the XMLReader interface using the feed, close and reset methods of the IncrementalParser interface as a convenience to SAX 2.0 driver writers.
IncrementalParser.close()  
Assume the end of the document. That will check well-formedness conditions that can be checked only at the end, invoke handlers, and may clean up resources allocated during parsing.
IncrementalParser.reset()  
This method is called after close has been called to reset the parser so that it is ready to parse new documents. The results of calling parse or feed after close without calling reset are undefined.
class xml.sax.xmlreader.InputSource(system_id=None)  
Encapsulation of the information needed by the XMLReader to read entities. This class may include information about the public identifier, system identifier, byte stream (possibly with character encoding information) and/or the character stream of an entity. Applications will create objects of this class for use in the XMLReader.parse() method and for returning from EntityResolver.resolveEntity. An InputSource belongs to the application, the XMLReader is not allowed to modify InputSource objects passed to it from the application, although it may make copies and modify those.
InputSource.getByteStream()  
Get the byte stream for this input source. The getEncoding method will return the character encoding for this byte stream, or None if unknown.
InputSource.setByteStream(bytefile)  
Set the byte stream (a binary file) for this input source. The SAX parser will ignore this if there is also a character stream specified, but it will use a byte stream in preference to opening a URI connection itself. If the application knows the character encoding of the byte stream, it should set it with the setEncoding method.
InputSource.setCharacterStream(charfile)  
Set the character stream (a text file) for this input source. If there is a character stream specified, the SAX parser will ignore any byte stream and will not attempt to open a URI connection to the system identifier.
InputSource.setEncoding(encoding)  
Sets the character encoding of this InputSource. The encoding must be a string acceptable for an XML encoding declaration (see section 4.3.3 of the XML recommendation). The encoding attribute of the InputSource is ignored if the InputSource also contains a character stream.
InputSource.setPublicId(id)  
Sets the public identifier of this InputSource.
class xml.sax.xmlreader.Locator  
Interface for associating a SAX event with a document location. A locator object will return valid results only during calls to DocumentHandler methods; at any other time, the results are unpredictable. If information is not available, methods may return None.
class xml.sax.xmlreader.XMLReader  
Base class which can be inherited by SAX parsers.
XMLReader.getFeature(featurename)  
Return the current setting for feature featurename. If the feature is not recognized, SAXNotRecognizedException is raised. The well-known featurenames are listed in the module xml.sax.handler.
XMLReader.getProperty(propertyname)  
Return the current setting for property propertyname. If the property is not recognized, a SAXNotRecognizedException is raised. The well-known propertynames are listed in the module xml.sax.handler.
XMLReader.parse(source)  
Process an input source, producing SAX events. The source object can be a system identifier (a string identifying the input source – typically a file name or a URL), a pathlib.Path or path-like object, or an InputSource object. When parse() returns, the input is completely processed, and the parser object can be discarded or reset.  Changed in version 3.5: Added support of character streams.   Changed in version 3.8: Added support of path-like objects.
XMLReader.setContentHandler(handler)  
Set the current ContentHandler. If no ContentHandler is set, content events will be discarded.
XMLReader.setDTDHandler(handler)  
Set the current DTDHandler. If no DTDHandler is set, DTD events will be discarded.
XMLReader.setEntityResolver(handler)  
Set the current EntityResolver. If no EntityResolver is set, attempts to resolve an external entity will result in opening the system identifier for the entity, and fail if it is not available.
XMLReader.setErrorHandler(handler)  
Set the current error handler. If no ErrorHandler is set, errors will be raised as exceptions, and warnings will be printed.
XMLReader.setFeature(featurename, value)  
Set the featurename to value. If the feature is not recognized, SAXNotRecognizedException is raised. If the feature or its setting is not supported by the parser, SAXNotSupportedException is raised.
XMLReader.setLocale(locale)  
Allow an application to set the locale for errors and warnings. SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, however, they must raise a SAX exception. Applications may request a locale change in the middle of a parse.
XMLReader.setProperty(propertyname, value)  
Set the propertyname to value. If the property is not recognized, SAXNotRecognizedException is raised. If the property or its setting is not supported by the parser, SAXNotSupportedException is raised.
xmlrpc — XMLRPC server and client modules XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP as a transport. With it, a client can call methods with parameters on a remote server (the server is named by a URI) and get back structured data. xmlrpc is a package that collects server and client modules implementing XML-RPC. The modules are:  xmlrpc.client xmlrpc.server
class xmlrpc.client.Binary  
This class may be initialized from bytes data (which may include NULs). The primary access to the content of a Binary object is provided by an attribute:  
data  
The binary data encapsulated by the Binary instance. The data is provided as a bytes object. 
 Binary objects have the following methods, supported mainly for internal use by the marshalling/unmarshalling code:  
decode(bytes)  
Accept a base64 bytes object and decode it as the instance’s new data. 
  
encode(out)  
Write the XML-RPC base 64 encoding of this binary item to the out stream object. The encoded data will have newlines every 76 characters as per RFC 2045 section 6.8, which was the de facto standard base64 specification when the XML-RPC spec was written. 
 It also supports certain of Python’s built-in operators through __eq__() and __ne__() methods.
data  
The binary data encapsulated by the Binary instance. The data is provided as a bytes object.
decode(bytes)  
Accept a base64 bytes object and decode it as the instance’s new data.
encode(out)  
Write the XML-RPC base 64 encoding of this binary item to the out stream object. The encoded data will have newlines every 76 characters as per RFC 2045 section 6.8, which was the de facto standard base64 specification when the XML-RPC spec was written.
class xmlrpc.client.DateTime  
This class may be initialized with seconds since the epoch, a time tuple, an ISO 8601 time/date string, or a datetime.datetime instance. It has the following methods, supported mainly for internal use by the marshalling/unmarshalling code:  
decode(string)  
Accept a string as the instance’s new time value. 
  
encode(out)  
Write the XML-RPC encoding of this DateTime item to the out stream object. 
 It also supports certain of Python’s built-in operators through rich comparison and __repr__() methods.
encode(out)  
Write the XML-RPC encoding of this DateTime item to the out stream object.
xmlrpc.client.dumps(params, methodname=None, methodresponse=None, encoding=None, allow_none=False)  
Convert params into an XML-RPC request. or into a response if methodresponse is true. params can be either a tuple of arguments or an instance of the Fault exception class. If methodresponse is true, only a single value can be returned, meaning that params must be of length 1. encoding, if supplied, is the encoding to use in the generated XML; the default is UTF-8. Python’s None value cannot be used in standard XML-RPC; to allow using it via an extension, provide a true value for allow_none.
class xmlrpc.client.Fault  
A Fault object encapsulates the content of an XML-RPC fault tag. Fault objects have the following attributes:  
faultCode  
A string indicating the fault type. 
  
faultString  
A string containing a diagnostic message associated with the fault.
xmlrpc.client.loads(data, use_datetime=False, use_builtin_types=False)  
Convert an XML-RPC request or response into Python objects, a (params,
methodname). params is a tuple of argument; methodname is a string, or None if no method name is present in the packet. If the XML-RPC packet represents a fault condition, this function will raise a Fault exception. The use_builtin_types flag can be used to cause date/time values to be presented as datetime.datetime objects and binary data to be presented as bytes objects; this flag is false by default. The obsolete use_datetime flag is similar to use_builtin_types but it applies only to date/time values.  Changed in version 3.3: The use_builtin_types flag was added.
class xmlrpc.client.MultiCall(server)  
Create an object used to boxcar method calls. server is the eventual target of the call. Calls can be made to the result object, but they will immediately return None, and only store the call name and parameters in the MultiCall object. Calling the object itself causes all stored calls to be transmitted as a single system.multicall request. The result of this call is a generator; iterating over this generator yields the individual results.
class xmlrpc.client.ProtocolError  
A ProtocolError object describes a protocol error in the underlying transport layer (such as a 404 ‘not found’ error if the server named by the URI does not exist). It has the following attributes:  
url  
The URI or URL that triggered the error. 
  
errcode  
The error code. 
  
errmsg  
The error message or diagnostic string. 
  
headers  
A dict containing the headers of the HTTP/HTTPS request that triggered the error.
class xmlrpc.client.ServerProxy(uri, transport=None, encoding=None, verbose=False, allow_none=False, use_datetime=False, use_builtin_types=False, *, headers=(), context=None)  
A ServerProxy instance is an object that manages communication with a remote XML-RPC server. The required first argument is a URI (Uniform Resource Indicator), and will normally be the URL of the server. The optional second argument is a transport factory instance; by default it is an internal SafeTransport instance for https: URLs and an internal HTTP Transport instance otherwise. The optional third argument is an encoding, by default UTF-8. The optional fourth argument is a debugging flag. The following parameters govern the use of the returned proxy instance. If allow_none is true, the Python constant None will be translated into XML; the default behaviour is for None to raise a TypeError. This is a commonly-used extension to the XML-RPC specification, but isn’t supported by all clients and servers; see http://ontosys.com/xml-rpc/extensions.php for a description. The use_builtin_types flag can be used to cause date/time values to be presented as datetime.datetime objects and binary data to be presented as bytes objects; this flag is false by default. datetime.datetime, bytes and bytearray objects may be passed to calls. The headers parameter is an optional sequence of HTTP headers to send with each request, expressed as a sequence of 2-tuples representing the header name and value. (e.g. [(‘Header-Name’, ‘value’)]). The obsolete use_datetime flag is similar to use_builtin_types but it applies only to date/time values.
ServerProxy.system.listMethods()  
This method returns a list of strings, one for each (non-system) method supported by the XML-RPC server.
ServerProxy.system.methodHelp(name)  
This method takes one parameter, the name of a method implemented by the XML-RPC server. It returns a documentation string describing the use of that method. If no such string is available, an empty string is returned. The documentation string may contain HTML markup.
ServerProxy.system.methodSignature(name)  
This method takes one parameter, the name of a method implemented by the XML-RPC server. It returns an array of possible signatures for this method. A signature is an array of types. The first of these types is the return type of the method, the rest are parameters. Because multiple signatures (ie. overloading) is permitted, this method returns a list of signatures rather than a singleton. Signatures themselves are restricted to the top level parameters expected by a method. For instance if a method expects one array of structs as a parameter, and it returns a string, its signature is simply “string, array”. If it expects three integers and returns a string, its signature is “string, int, int, int”. If no signature is defined for the method, a non-array value is returned. In Python this means that the type of the returned value will be something other than list.
class xmlrpc.server.CGIXMLRPCRequestHandler(allow_none=False, encoding=None, use_builtin_types=False)  
Create a new instance to handle XML-RPC requests in a CGI environment. The allow_none and encoding parameters are passed on to xmlrpc.client and control the XML-RPC responses that will be returned from the server. The use_builtin_types parameter is passed to the loads() function and controls which types are processed when date/times values or binary data are received; it defaults to false.  Changed in version 3.3: The use_builtin_types flag was added.
CGIXMLRPCRequestHandler.handle_request(request_text=None)  
Handle an XML-RPC request. If request_text is given, it should be the POST data provided by the HTTP server, otherwise the contents of stdin will be used.
CGIXMLRPCRequestHandler.register_function(function=None, name=None)  
Register a function that can respond to XML-RPC requests. If name is given, it will be the method name associated with function, otherwise function.__name__ will be used. name is a string, and may contain characters not legal in Python identifiers, including the period character. This method can also be used as a decorator. When used as a decorator, name can only be given as a keyword argument to register function under name. If no name is given, function.__name__ will be used.  Changed in version 3.7: register_function() can be used as a decorator.
CGIXMLRPCRequestHandler.register_instance(instance)  
Register an object which is used to expose method names which have not been registered using register_function(). If instance contains a _dispatch() method, it is called with the requested method name and the parameters from the request; the return value is returned to the client as the result. If instance does not have a _dispatch() method, it is searched for an attribute matching the name of the requested method; if the requested method name contains periods, each component of the method name is searched for individually, with the effect that a simple hierarchical search is performed. The value found from this search is then called with the parameters from the request, and the return value is passed back to the client.
CGIXMLRPCRequestHandler.register_introspection_functions()  
Register the XML-RPC introspection functions system.listMethods, system.methodHelp and system.methodSignature.
CGIXMLRPCRequestHandler.register_multicall_functions()  
Register the XML-RPC multicall function system.multicall.
class xmlrpc.server.DocCGIXMLRPCRequestHandler  
Create a new instance to handle XML-RPC requests in a CGI environment.
DocCGIXMLRPCRequestHandler.set_server_documentation(server_documentation)  
Set the description used in the generated HTML documentation. This description will appear as a paragraph, below the server name, in the documentation.
DocCGIXMLRPCRequestHandler.set_server_name(server_name)  
Set the name used in the generated HTML documentation. This name will appear at the top of the generated documentation inside a “h1” element.
DocCGIXMLRPCRequestHandler.set_server_title(server_title)  
Set the title used in the generated HTML documentation. This title will be used inside the HTML “title” element.