Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #1/usr/bin/env python
- # this is from The Python
- # Standard Library by example
- # ISBN13: 9780321767349
- import codecs
- from codecs_to_hex import to_hex
- for name in ['BOM', 'BOM_BE', 'BOM_LE',
- 'BOM_UTF8',
- 'BOM_UTF16', 'BOM_UTF16_BE', 'BOM_UTF16_LE',
- 'BOM_UTF32', 'BOM_UTF32_BE', 'BOM_UTF32_LE',
- ]:
- print '{:12} : {}'.format(name, to_hex(getattr(codecs, name), 2))
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement