forked from html5lib/html5lib-python
- Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdebug-info.py
More file actions
Latest commit
37 lines (26 loc) · 768 Bytes
/
Copy pathdebug-info.py
File metadata and controls
37 lines (26 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
from __future__ importprint_function, unicode_literals
importplatform
importsys
info= {
"impl": platform.python_implementation(),
"version": platform.python_version(),
"revision": platform.python_revision(),
"maxunicode": sys.maxunicode,
"maxsize": sys.maxsize
}
search_modules= ["chardet", "datrie", "genshi", "html5lib", "lxml", "six"]
found_modules= []
forminsearch_modules:
try:
__import__(m)
exceptImportError:
pass
else:
found_modules.append(m)
info["modules"] =", ".join(found_modules)
print("""html5lib debug info:
Python %(version)s (revision: %(revision)s)
Implementation: %(impl)s
sys.maxunicode: %(maxunicode)X
sys.maxsize: %(maxsize)X
Installed modules: %(modules)s"""%info)