Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def _safe_print(u, errors="replace"):
- """Safely print the given string.
- If you want to see the code points for unprintable characters then you
- can use `errors="xmlcharrefreplace"`.
- """
- s = u.encode(sys.stdout.encoding or "utf-8", errors)
- print(s)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement