ok
Direktori : /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/ |
Current File : //opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/__init__.pyc |
� Bu�_c @` sv 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 � Z d � Z 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 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. i ( t absolute_importt divisiont unicode_literalsi ( t constants( t default_etreeu getTreeWalkeru pprintc K` s� | j � } | t k r� | d k rD d d l m } | j t | <q� | d k rp 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( u; 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 u domi ( t domu genshi( t genshiu lxml( t etree_lxmlu etree( t etreeN( t lowert treeWalkerCachet R t TreeWalkerR R R t NoneR t getETreeModulet get( t treeTypet implementationt kwargsR R R R ( ( sZ /opt/alt/python36/lib/python3.6/site-packages/pip/_vendor/html5lib/treewalkers/__init__.pyt getTreeWalker s"