관리-도구
편집 파일: __init__.cpython-35.pyc
��ReW � @ s d Z d d l m Z m Z m Z d d l m Z d d l m Z d d g Z i Z d d d � Z d d � Z d d � Z d S) a� A collection of modules for iterating through different kinds of tree, generating tokens identical to those produced by the tokenizer module. To create a tree walker for a new type of tree, you need to implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method which takes a tree as sole argument and returns an iterator which generates tokens. � )�absolute_import�division�unicode_literals� )� constants)� default_etree� getTreeWalker�pprintNc K s� | j � } | t k r� | d k rD d d l m } | j t | <n� | d k rp d d l m } | j t | <nm | d k r� d d l m } | j t | <nA | d k r� d d l m } | d k r� t } | j | | � j St j | � S)a; Get a TreeWalker class for various types of tree with built-in support :arg str treeType: the name of the tree type required (case-insensitive). Supported values are: * "dom": The xml.dom.minidom DOM implementation * "etree": A generic walker for tree implementations exposing an elementtree-like interface (known to work with ElementTree, cElementTree and lxml.etree). * "lxml": Optimized walker for lxml.etree * "genshi": a Genshi stream :arg implementation: A module implementing the tree type e.g. xml.etree.ElementTree or cElementTree (Currently applies to the "etree" tree type only). :arg kwargs: keyword arguments passed to the etree walker--for other walkers, this has no effect :returns: a TreeWalker class �dom� )r �genshi)r �lxml)� etree_lxml�etree)r N)�lower�treeWalkerCache� r � TreeWalkerr r r r �getETreeModule�get)�treeType�implementation�kwargsr r r r � r ��/builddir/build/BUILDROOT/alt-python35-pip-20.2.4-5.el8.x86_64/opt/alt/python35/lib/python3.5/site-packages/pip/_vendor/html5lib/treewalkers/__init__.pyr s"