Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import sys, locale
- expressions = """
- locale.getpreferredencoding()
- type(my_file)
- my_file.encoding
- sys.stdout.isatty()
- sys.stdout.encoding
- sys.stdin.isatty()
- sys.stdin.encoding
- sys.stderr.isatty()
- sys.stderr.encoding
- sys.getdefaultencoding()
- sys.getfilesystemencoding()
- """
- my_file = open('dummy', 'w')
- for expression in expressions.split():
- value = eval(expression)
- print(expression.rjust(30), '->', repr(value))
Add Comment
Please, Sign In to add comment