Guest User

Untitled

a guest
Mar 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.41 KB | None | 0 0
  1. import sys, locale
  2. expressions = """
  3. locale.getpreferredencoding()
  4. type(my_file)
  5. my_file.encoding
  6. sys.stdout.isatty()
  7. sys.stdout.encoding
  8. sys.stdin.isatty()
  9. sys.stdin.encoding
  10. sys.stderr.isatty()
  11. sys.stderr.encoding
  12. sys.getdefaultencoding()
  13. sys.getfilesystemencoding()
  14. """
  15. my_file = open('dummy', 'w')
  16. for expression in expressions.split():
  17. value = eval(expression)
  18. print(expression.rjust(30), '->', repr(value))
Add Comment
Please, Sign In to add comment