Revert "Migrate as much as possible to pip and requirements.txt"

This reverts commit 982594a4a5.
This commit is contained in:
rembo10
2016-01-29 15:38:12 +00:00
parent 3c015990c5
commit 2110eb9855
1195 changed files with 196887 additions and 81 deletions

View File

@@ -0,0 +1,16 @@
from __future__ import absolute_import, division, unicode_literals
from .. import treewalkers
from .htmlserializer import HTMLSerializer
def serialize(input, tree="etree", format="html", encoding=None,
**serializer_opts):
# XXX: Should we cache this?
walker = treewalkers.getTreeWalker(tree)
if format == "html":
s = HTMLSerializer(**serializer_opts)
else:
raise ValueError("type must be html")
return s.render(walker(input), encoding)