Rewrite wcwidth.py