__init__.py 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041
  1. """
  2. Wcwidth module.
  3. https://github.com/jquast/wcwidth
  4. """
  5. # re-export all functions & definitions, even private ones, from top-level
  6. # module path, to allow for 'from wcwidth import _private_func'. Of course,
  7. # user beware that any _private functions or variables not exported by __all__
  8. # may disappear or change signature at any future version.
  9. # local
  10. from .wcwidth import ZERO_WIDTH # noqa
  11. from .wcwidth import (WIDE_EASTASIAN,
  12. AMBIGUOUS_EASTASIAN,
  13. VS16_NARROW_TO_WIDE,
  14. clip,
  15. ljust,
  16. rjust,
  17. width,
  18. center,
  19. wcwidth,
  20. wcswidth,
  21. list_versions,
  22. iter_sequences,
  23. strip_sequences,
  24. _wcmatch_version,
  25. _wcversion_value)
  26. from .bisearch import bisearch as _bisearch
  27. from .grapheme import iter_graphemes # noqa
  28. from .textwrap import SequenceTextWrapper, wrap
  29. # The __all__ attribute defines the items exported from statement,
  30. # 'from wcwidth import *', but also to say, "This is the public API".
  31. __all__ = ('wcwidth', 'wcswidth', 'width', 'iter_sequences', 'iter_graphemes',
  32. 'ljust', 'rjust', 'center', 'wrap', 'clip', 'strip_sequences',
  33. 'list_versions')
  34. # We also used pkg_resources to load unicode version tables from version.json,
  35. # generated by bin/update-tables.py, but some environments are unable to
  36. # import pkg_resources for one reason or another, yikes!
  37. __version__ = '0.3.2'