updated from Atlas
This commit is contained in:
21
04-text-byte/default_encodings.py
Normal file
21
04-text-byte/default_encodings.py
Normal file
@@ -0,0 +1,21 @@
|
||||
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))
|
||||
Reference in New Issue
Block a user