python: Converted ashd.htlib to Python 3 API.