/snap/core22/2437/usr/lib/python3.10/xml/dom/__pycache__
NameSizeModeActions
domreg.cpython-310.pyc28590644editdlrm
expatbuilder.cpython-310.pyc273090644editdlrm
minicompat.cpython-310.pyc26900644editdlrm
minidom.cpython-310.pyc551740644editdlrm
NodeFilter.cpython-310.pyc9680644editdlrm
pulldom.cpython-310.pyc105540644editdlrm
xmlbuilder.cpython-310.pyc123010644editdlrm
__init__.cpython-310.pyc52770644editdlrm
Edit: /snap/core22/2437/usr/lib/python3.10/xml/dom/__pycache__/domreg.cpython-310.pyc (2859B)
o p̦i{ @s@dZddlZdddZiZddZdd Zdd d Zd dZdS)zRegistration facilities for DOM. This module should not be used directly. Instead, the functions getDOMImplementation and registerDOMImplementation should be imported from xml.dom.Nzxml.dom.minidomzxml.dom.DOMImplementation)minidom4DOMcCs |t|<dS)aIregisterDOMImplementation(name, factory) Register the factory function with the name. The factory function should return an object which implements the DOMImplementation interface. The factory function can either return the same object, or a new one (e.g. if that implementation supports some customization).N) registered)namefactoryr%/usr/lib/python3.10/xml/dom/domreg.pyregisterDOMImplementations r cCs$|D] \}}|||sdSqdS)zF_good_enough(dom, features) -> Return 1 if the dom offers the featuresr) hasFeature)domfeaturesfvrrr _good_enough s  rrc Csddl}d}t|}|rt|iidg}|S|r t|Stjjs1d|j vr1t|j ddSt |t r:t |}t D]}|}t||rL|Sq>tD]}zt|d}Wn tycYqQwt||rm|SqQtd)aSgetDOMImplementation(name = None, features = ()) -> DOM implementation. Return a suitable DOM implementation. The name is either well-known, the module name of a DOM implementation, or None. If it is not None, imports the corresponding module and returns DOMImplementation object if the import succeeds. If name is not given, consider the available implementations to find one with the required feature set. If no implementation can be found, raise an ImportError. The features list must be a sequence of (feature, version) pairs which are passed to hasFeature.rNgetDOMImplementation PYTHON_DOM)rz$no suitable DOM implementation found)oswell_known_implementationsget __import__rrsysflagsignore_environmentenviron isinstancestr_parse_feature_stringvaluesrkeys Exception ImportError)rr rcreatormodr rrrr's6         rcCsg}|}d}t|}||krF||}|ddvr!td|f|d}d}||kr;||}|ddvr;|d}|}|||f||kst|S)Nr 0123456789zbad feature name: %rr )splitlen ValueErrorappendtuple)sr partsilengthfeatureversionrrrrrRs$   r)Nr)__doc__rrrr rrrrrrrs  +