ok
Direktori : /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/ |
Current File : //usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/__init__.pyc |
� ��abc @` s� d Z d d l m Z m Z m Z d d l m Z d d l m Z d d d d 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 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 ( t absolute_importt divisiont unicode_literalsi ( t constants( t default_etreeu getTreeWalkeru pprintu domu etreeu genshiu etree_lxmlc 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 Args: treeType (str): 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 Implementation: A module implementing the tree type e.g. xml.etree.ElementTree or cElementTree (Currently applies to the "etree" tree type only). 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 ( ( sM /usr/lib/python2.7/site-packages/pip/_vendor/html5lib/treewalkers/__init__.pyt getTreeWalker s"