관리-도구
편집 파일: __init__.cpython-33.pyc
� 7�Re c @ sW d Z d d l m Z m Z m Z d d l Z d d l m Z i Z d d d � Z d S( u� 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 do implement a tree walker object (called TreeWalker by convention) that implements a 'serialize' method taking a tree as sole argument and returning an iterator generating tokens. i ( u absolute_importu divisionu unicode_literalsNi ( u default_etreec K s | j � } | t k r� | d k r[ d t | f } t | � t j | } | j t | <q� | d k r� d d l m } | j t | <q� | d k r� d d l m } | j t | <q� | d k r� d d l m } | d k r� t } n | j | | � j Sn t j | � S( u6 Get a TreeWalker class for various types of tree with built-in support treeType - the name of the tree type required (case-insensitive). Supported values are: "dom" - The xml.dom.minidom DOM implementation "pulldom" - The xml.dom.pulldom event stream "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 implementation - (Currently applies to the "etree" tree type only). A module implementing the tree type e.g. xml.etree.ElementTree or cElementTree.u domu pulldomu %s.%su genshii ( u genshistreamu lxml( u lxmletreeu etree( u etree( u domu pulldomN( u loweru treeWalkerCacheu __name__u __import__u sysu modulesu TreeWalkeru u genshistreamu lxmletreeu etreeu Noneu default_etreeu getETreeModuleu get( u treeTypeu implementationu kwargsu nameu modu genshistreamu lxmletreeu etree( ( uB /tmp/pip-zej_zi-build/pip/_vendor/html5lib/treewalkers/__init__.pyu getTreeWalker s&