doc_content stringlengths 1 386k | doc_id stringlengths 5 188 |
|---|---|
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 p... | python.library.xml.sax.reader#xml.sax.xmlreader.XMLReader.setLocale |
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. | python.library.xml.sax.reader#xml.sax.xmlreader.XMLReader.setProperty |
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... | python.library.xmlrpc |
xmlrpc.client — XML-RPC client access Source code: Lib/xmlrpc/client.py XML-RPC is a Remote Procedure Call method that uses XML passed via HTTP(S) 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. This module supports writi... | python.library.xmlrpc.client |
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... | python.library.xmlrpc.client#xmlrpc.client.Binary |
data
The binary data encapsulated by the Binary instance. The data is provided as a bytes object. | python.library.xmlrpc.client#xmlrpc.client.Binary.data |
decode(bytes)
Accept a base64 bytes object and decode it as the instance’s new data. | python.library.xmlrpc.client#xmlrpc.client.Binary.decode |
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. | python.library.xmlrpc.client#xmlrpc.client.Binary.encode |
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 instanc... | python.library.xmlrpc.client#xmlrpc.client.DateTime |
decode(string)
Accept a string as the instance’s new time value. | python.library.xmlrpc.client#xmlrpc.client.DateTime.decode |
encode(out)
Write the XML-RPC encoding of this DateTime item to the out stream object. | python.library.xmlrpc.client#xmlrpc.client.DateTime.encode |
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... | python.library.xmlrpc.client#xmlrpc.client.dumps |
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. | python.library.xmlrpc.client#xmlrpc.client.Fault |
faultCode
A string indicating the fault type. | python.library.xmlrpc.client#xmlrpc.client.Fault.faultCode |
faultString
A string containing a diagnostic message associated with the fault. | python.library.xmlrpc.client#xmlrpc.client.Fault.faultString |
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... | python.library.xmlrpc.client#xmlrpc.client.loads |
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... | python.library.xmlrpc.client#xmlrpc.client.MultiCall |
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.
err... | python.library.xmlrpc.client#xmlrpc.client.ProtocolError |
errcode
The error code. | python.library.xmlrpc.client#xmlrpc.client.ProtocolError.errcode |
errmsg
The error message or diagnostic string. | python.library.xmlrpc.client#xmlrpc.client.ProtocolError.errmsg |
headers
A dict containing the headers of the HTTP/HTTPS request that triggered the error. | python.library.xmlrpc.client#xmlrpc.client.ProtocolError.headers |
url
The URI or URL that triggered the error. | python.library.xmlrpc.client#xmlrpc.client.ProtocolError.url |
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 Reso... | python.library.xmlrpc.client#xmlrpc.client.ServerProxy |
ServerProxy.system.listMethods()
This method returns a list of strings, one for each (non-system) method supported by the XML-RPC server. | python.library.xmlrpc.client#xmlrpc.client.ServerProxy.system.listMethods |
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. | python.library.xmlrpc.client#xmlrpc.client.ServerProxy.system.methodHelp |
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 mu... | python.library.xmlrpc.client#xmlrpc.client.ServerProxy.system.methodSignature |
xmlrpc.server — Basic XML-RPC servers Source code: Lib/xmlrpc/server.py The xmlrpc.server module provides a basic server framework for XML-RPC servers written in Python. Servers can either be free standing, using SimpleXMLRPCServer, or embedded in a CGI environment, using CGIXMLRPCRequestHandler. Warning The xmlrpc.se... | python.library.xmlrpc.server |
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. Th... | python.library.xmlrpc.server#xmlrpc.server.CGIXMLRPCRequestHandler |
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. | python.library.xmlrpc.server#xmlrpc.server.CGIXMLRPCRequestHandler.handle_request |
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, i... | python.library.xmlrpc.server#xmlrpc.server.CGIXMLRPCRequestHandler.register_function |
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... | python.library.xmlrpc.server#xmlrpc.server.CGIXMLRPCRequestHandler.register_instance |
CGIXMLRPCRequestHandler.register_introspection_functions()
Register the XML-RPC introspection functions system.listMethods, system.methodHelp and system.methodSignature. | python.library.xmlrpc.server#xmlrpc.server.CGIXMLRPCRequestHandler.register_introspection_functions |
CGIXMLRPCRequestHandler.register_multicall_functions()
Register the XML-RPC multicall function system.multicall. | python.library.xmlrpc.server#xmlrpc.server.CGIXMLRPCRequestHandler.register_multicall_functions |
class xmlrpc.server.DocCGIXMLRPCRequestHandler
Create a new instance to handle XML-RPC requests in a CGI environment. | python.library.xmlrpc.server#xmlrpc.server.DocCGIXMLRPCRequestHandler |
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. | python.library.xmlrpc.server#xmlrpc.server.DocCGIXMLRPCRequestHandler.set_server_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. | python.library.xmlrpc.server#xmlrpc.server.DocCGIXMLRPCRequestHandler.set_server_name |
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. | python.library.xmlrpc.server#xmlrpc.server.DocCGIXMLRPCRequestHandler.set_server_title |
class xmlrpc.server.DocXMLRPCRequestHandler
Create a new request handler instance. This request handler supports XML-RPC POST requests, documentation GET requests, and modifies logging so that the logRequests parameter to the DocXMLRPCServer constructor parameter is honored. | python.library.xmlrpc.server#xmlrpc.server.DocXMLRPCRequestHandler |
class xmlrpc.server.DocXMLRPCServer(addr, requestHandler=DocXMLRPCRequestHandler, logRequests=True, allow_none=False, encoding=None, bind_and_activate=True, use_builtin_types=True)
Create a new server instance. All parameters have the same meaning as for SimpleXMLRPCServer; requestHandler defaults to DocXMLRPCRequest... | python.library.xmlrpc.server#xmlrpc.server.DocXMLRPCServer |
DocXMLRPCServer.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. | python.library.xmlrpc.server#xmlrpc.server.DocXMLRPCServer.set_server_documentation |
DocXMLRPCServer.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. | python.library.xmlrpc.server#xmlrpc.server.DocXMLRPCServer.set_server_name |
DocXMLRPCServer.set_server_title(server_title)
Set the title used in the generated HTML documentation. This title will be used inside the HTML “title” element. | python.library.xmlrpc.server#xmlrpc.server.DocXMLRPCServer.set_server_title |
class xmlrpc.server.SimpleXMLRPCRequestHandler
Create a new request handler instance. This request handler supports POST requests and modifies logging so that the logRequests parameter to the SimpleXMLRPCServer constructor parameter is honored. | python.library.xmlrpc.server#xmlrpc.server.SimpleXMLRPCRequestHandler |
SimpleXMLRPCRequestHandler.rpc_paths
An attribute value that must be a tuple listing valid path portions of the URL for receiving XML-RPC requests. Requests posted to other paths will result in a 404 “no such page” HTTP error. If this tuple is empty, all paths will be considered valid. The default value is ('/', '/RP... | python.library.xmlrpc.server#xmlrpc.server.SimpleXMLRPCRequestHandler.rpc_paths |
class xmlrpc.server.SimpleXMLRPCServer(addr, requestHandler=SimpleXMLRPCRequestHandler, logRequests=True, allow_none=False, encoding=None, bind_and_activate=True, use_builtin_types=False)
Create a new server instance. This class provides methods for registration of functions that can be called by the XML-RPC protocol... | python.library.xmlrpc.server#xmlrpc.server.SimpleXMLRPCServer |
SimpleXMLRPCServer.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, includ... | python.library.xmlrpc.server#xmlrpc.server.SimpleXMLRPCServer.register_function |
SimpleXMLRPCServer.register_instance(instance, allow_dotted_names=False)
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. Its API... | python.library.xmlrpc.server#xmlrpc.server.SimpleXMLRPCServer.register_instance |
SimpleXMLRPCServer.register_introspection_functions()
Registers the XML-RPC introspection functions system.listMethods, system.methodHelp and system.methodSignature. | python.library.xmlrpc.server#xmlrpc.server.SimpleXMLRPCServer.register_introspection_functions |
SimpleXMLRPCServer.register_multicall_functions()
Registers the XML-RPC multicall function system.multicall. | python.library.xmlrpc.server#xmlrpc.server.SimpleXMLRPCServer.register_multicall_functions |
exception ZeroDivisionError
Raised when the second argument of a division or modulo operation is zero. The associated value is a string indicating the type of the operands and the operation. | python.library.exceptions#ZeroDivisionError |
zip(*iterables)
Make an iterator that aggregates elements from each of the iterables. Returns an iterator of tuples, where the i-th tuple contains the i-th element from each of the argument sequences or iterables. The iterator stops when the shortest input iterable is exhausted. With a single iterable argument, it re... | python.library.functions#zip |
zipapp — Manage executable Python zip archives New in version 3.5. Source code: Lib/zipapp.py This module provides tools to manage the creation of zip files containing Python code, which can be executed directly by the Python interpreter. The module provides both a Command-Line Interface and a Python API. Basic Examp... | python.library.zipapp |
zipapp.create_archive(source, target=None, interpreter=None, main=None, filter=None, compressed=False)
Create an application archive from source. The source can be any of the following: The name of a directory, or a path-like object referring to a directory, in which case a new application archive will be created fr... | python.library.zipapp#zipapp.create_archive |
zipapp.get_interpreter(archive)
Return the interpreter specified in the #! line at the start of the archive. If there is no #! line, return None. The archive argument can be a filename or a file-like object open for reading in bytes mode. It is assumed to be at the start of the archive. | python.library.zipapp#zipapp.get_interpreter |
zipfile — Work with ZIP archives Source code: Lib/zipfile.py The ZIP file format is a common archive and compression standard. This module provides tools to create, read, write, append, and list a ZIP file. Any advanced use of this module will require an understanding of the format, as defined in PKZIP Application Note... | python.library.zipfile |
exception zipfile.BadZipfile
Alias of BadZipFile, for compatibility with older Python versions. Deprecated since version 3.2. | python.library.zipfile#zipfile.BadZipfile |
exception zipfile.BadZipFile
The error raised for bad ZIP files. New in version 3.2. | python.library.zipfile#zipfile.BadZipFile |
zipfile.is_zipfile(filename)
Returns True if filename is a valid ZIP file based on its magic number, otherwise returns False. filename may be a file or file-like object too. Changed in version 3.1: Support for file and file-like objects. | python.library.zipfile#zipfile.is_zipfile |
exception zipfile.LargeZipFile
The error raised when a ZIP file would require ZIP64 functionality but that has not been enabled. | python.library.zipfile#zipfile.LargeZipFile |
class zipfile.Path(root, at='')
Construct a Path object from a root zipfile (which may be a ZipFile instance or file suitable for passing to the ZipFile constructor). at specifies the location of this Path within the zipfile, e.g. ‘dir/file.txt’, ‘dir/’, or ‘’. Defaults to the empty string, indicating the root. | python.library.zipfile#zipfile.Path |
Path.exists()
Return True if the current context references a file or directory in the zip file. | python.library.zipfile#zipfile.Path.exists |
Path.is_dir()
Return True if the current context references a directory. | python.library.zipfile#zipfile.Path.is_dir |
Path.is_file()
Return True if the current context references a file. | python.library.zipfile#zipfile.Path.is_file |
Path.iterdir()
Enumerate the children of the current directory. | python.library.zipfile#zipfile.Path.iterdir |
Path.name
The final path component. | python.library.zipfile#zipfile.Path.name |
Path.open(mode='r', *, pwd, **)
Invoke ZipFile.open() on the current path. Allows opening for read or write, text or binary through supported modes: ‘r’, ‘w’, ‘rb’, ‘wb’. Positional and keyword arguments are passed through to io.TextIOWrapper when opened as text and ignored otherwise. pwd is the pwd parameter to ZipF... | python.library.zipfile#zipfile.Path.open |
Path.read_bytes()
Read the current file as bytes. | python.library.zipfile#zipfile.Path.read_bytes |
Path.read_text(*, **)
Read the current file as unicode text. Positional and keyword arguments are passed through to io.TextIOWrapper (except buffer, which is implied by the context). | python.library.zipfile#zipfile.Path.read_text |
class zipfile.PyZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=True, optimize=-1)
New in version 3.2: The optimize parameter. Changed in version 3.4: ZIP64 extensions are enabled by default. Instances have one method in addition to those of ZipFile objects:
writepy(pathname, basename='', filterfunc=... | python.library.zipfile#zipfile.PyZipFile |
writepy(pathname, basename='', filterfunc=None)
Search for files *.py and add the corresponding file to the archive. If the optimize parameter to PyZipFile was not given or -1, the corresponding file is a *.pyc file, compiling if necessary. If the optimize parameter to PyZipFile was 0, 1 or 2, only files with that op... | python.library.zipfile#zipfile.PyZipFile.writepy |
class zipfile.ZipFile(file, mode='r', compression=ZIP_STORED, allowZip64=True, compresslevel=None, *, strict_timestamps=True)
Open a ZIP file, where file can be a path to a file (a string), a file-like object or a path-like object. The mode parameter should be 'r' to read an existing file, 'w' to truncate and write a... | python.library.zipfile#zipfile.ZipFile |
ZipFile.close()
Close the archive file. You must call close() before exiting your program or essential records will not be written. | python.library.zipfile#zipfile.ZipFile.close |
ZipFile.comment
The comment associated with the ZIP file as a bytes object. If assigning a comment to a ZipFile instance created with mode 'w', 'x' or 'a', it should be no longer than 65535 bytes. Comments longer than this will be truncated. | python.library.zipfile#zipfile.ZipFile.comment |
ZipFile.debug
The level of debug output to use. This may be set from 0 (the default, no output) to 3 (the most output). Debugging information is written to sys.stdout. | python.library.zipfile#zipfile.ZipFile.debug |
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 obje... | python.library.zipfile#zipfile.ZipFile.extract |
ZipFile.extractall(path=None, members=None, pwd=None)
Extract all members from the archive to the current working directory. path specifies a different directory to extract to. members is optional and must be a subset of the list returned by namelist(). pwd is the password used for encrypted files. Warning Never ext... | python.library.zipfile#zipfile.ZipFile.extractall |
ZipFile.filename
Name of the ZIP file. | python.library.zipfile#zipfile.ZipFile.filename |
ZipFile.getinfo(name)
Return a ZipInfo object with information about the archive member name. Calling getinfo() for a name not currently contained in the archive will raise a KeyError. | python.library.zipfile#zipfile.ZipFile.getinfo |
ZipFile.infolist()
Return a list containing a ZipInfo object for each member of the archive. The objects are in the same order as their entries in the actual ZIP file on disk if an existing archive was opened. | python.library.zipfile#zipfile.ZipFile.infolist |
ZipFile.namelist()
Return a list of archive members by name. | python.library.zipfile#zipfile.ZipFile.namelist |
ZipFile.open(name, mode='r', pwd=None, *, force_zip64=False)
Access a member of the archive as a binary file-like object. name can be either the name of a file within the archive or a ZipInfo object. The mode parameter, if included, must be 'r' (the default) or 'w'. pwd is the password used to decrypt encrypted ZIP f... | python.library.zipfile#zipfile.ZipFile.open |
ZipFile.printdir()
Print a table of contents for the archive to sys.stdout. | python.library.zipfile#zipfile.ZipFile.printdir |
ZipFile.read(name, pwd=None)
Return the bytes of the file name in the archive. name is the name of the file in the archive, or a ZipInfo object. The archive must be open for read or append. pwd is the password used for encrypted files and, if specified, it will override the default password set with setpassword(). Ca... | python.library.zipfile#zipfile.ZipFile.read |
ZipFile.setpassword(pwd)
Set pwd as default password to extract encrypted files. | python.library.zipfile#zipfile.ZipFile.setpassword |
ZipFile.testzip()
Read all the files in the archive and check their CRC’s and file headers. Return the name of the first bad file, or else return None. Changed in version 3.6: Calling testzip() on a closed ZipFile will raise a ValueError. Previously, a RuntimeError was raised. | python.library.zipfile#zipfile.ZipFile.testzip |
ZipFile.write(filename, arcname=None, compress_type=None, compresslevel=None)
Write the file named filename to the archive, giving it the archive name arcname (by default, this will be the same as filename, but without a drive letter and with leading path separators removed). If given, compress_type overrides the val... | python.library.zipfile#zipfile.ZipFile.write |
ZipFile.writestr(zinfo_or_arcname, data, compress_type=None, compresslevel=None)
Write a file into the archive. The contents is data, which may be either a str or a bytes instance; if it is a str, it is encoded as UTF-8 first. zinfo_or_arcname is either the file name it will be given in the archive, or a ZipInfo inst... | python.library.zipfile#zipfile.ZipFile.writestr |
class zipfile.ZipInfo(filename='NoName', date_time=(1980, 1, 1, 0, 0, 0))
Class used to represent information about a member of an archive. Instances of this class are returned by the getinfo() and infolist() methods of ZipFile objects. Most users of the zipfile module will not need to create these, but only use thos... | python.library.zipfile#zipfile.ZipInfo |
ZipInfo.comment
Comment for the individual archive member as a bytes object. | python.library.zipfile#zipfile.ZipInfo.comment |
ZipInfo.compress_size
Size of the compressed data. | python.library.zipfile#zipfile.ZipInfo.compress_size |
ZipInfo.compress_type
Type of compression for the archive member. | python.library.zipfile#zipfile.ZipInfo.compress_type |
ZipInfo.CRC
CRC-32 of the uncompressed file. | python.library.zipfile#zipfile.ZipInfo.CRC |
ZipInfo.create_system
System which created ZIP archive. | python.library.zipfile#zipfile.ZipInfo.create_system |
ZipInfo.create_version
PKZIP version which created ZIP archive. | python.library.zipfile#zipfile.ZipInfo.create_version |
ZipInfo.date_time
The time and date of the last modification to the archive member. This is a tuple of six values:
Index Value
0 Year (>= 1980)
1 Month (one-based)
2 Day of month (one-based)
3 Hours (zero-based)
4 Minutes (zero-based)
5 Seconds (zero-based) Note The ZIP file format does not support... | python.library.zipfile#zipfile.ZipInfo.date_time |
ZipInfo.external_attr
External file attributes. | python.library.zipfile#zipfile.ZipInfo.external_attr |
ZipInfo.extra
Expansion field data. The PKZIP Application Note contains some comments on the internal structure of the data contained in this bytes object. | python.library.zipfile#zipfile.ZipInfo.extra |
ZipInfo.extract_version
PKZIP version needed to extract archive. | python.library.zipfile#zipfile.ZipInfo.extract_version |
ZipInfo.filename
Name of the file in the archive. | python.library.zipfile#zipfile.ZipInfo.filename |
ZipInfo.file_size
Size of the uncompressed file. | python.library.zipfile#zipfile.ZipInfo.file_size |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.