summaryrefslogtreecommitdiff
path: root/beautifulsoup/builder/__init__.py
diff options
context:
space:
mode:
authorLeonard Richardson <leonard.richardson@canonical.com>2011-02-20 15:28:22 -0500
committerLeonard Richardson <leonard.richardson@canonical.com>2011-02-20 15:28:22 -0500
commit963cff867aac9b02041474522d59f665a4c4a58d (patch)
tree3cfcfcbfb60d758dd5a930453bbbdc2be0507584 /beautifulsoup/builder/__init__.py
parent89961f4de3ab1e88b15dd9c0aaa0af77a7c32262 (diff)
Use registration code to register builders. The registration code will be expanded later.
Diffstat (limited to 'beautifulsoup/builder/__init__.py')
-rw-r--r--beautifulsoup/builder/__init__.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/beautifulsoup/builder/__init__.py b/beautifulsoup/builder/__init__.py
index d6c750c..2e8846b 100644
--- a/beautifulsoup/builder/__init__.py
+++ b/beautifulsoup/builder/__init__.py
@@ -163,5 +163,12 @@ class HTMLTreeBuilder(TreeBuilder):
pass
return False
+
+def register_builders_from(module, add_to_all):
+ __import__(module.__name__, module.__all__)
+ add_to_all += module.__all__
+
from _lxml import *
+register_builders_from(_lxml, __all__)
from _html5lib import *
+register_builders_from(_html5lib, __all__)