def get_unicodedata():
"""Download the unicodedata version for the given Python version."""
import unicodedata
fail = False
path = os.path.join(os.path.dirname(__file__), 'tools')
fp, pathname, desc = imp.find_module('unidatadownload', [path])
try:
unidatadownload = imp.load_module('unidatadownload', fp, pathname, desc)
unidatadownload.get_unicodedata(unicodedata.unidata_version, no_zip=True)
except Exception:
print(traceback.format_exc())
fail = True
finally:
fp.close()
assert not fail, "Failed to obtain unicodedata!"
评论列表
文章目录