Created
April 18, 2018 13:36
-
-
Save jbn/6b87f180cff5dae4b6554ef58ba26c6f to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import sys, locale | |
exprs = """ | |
locale.getpreferredencoding() | |
type(fp) | |
fp.encoding | |
sys.stdout.isatty() | |
sys.stdout.encoding | |
sys.stdin.isatty() | |
sys.stdin.encoding | |
sys.stderr.isatty() | |
sys.stderr.encoding | |
sys.getdefaultencoding() | |
sys.getfilesystemencoding() | |
""" | |
with open("./YOUR_NOTEBOOK_FILE.ipynb", "r") as fp: | |
for expr in exprs.strip().split(): | |
print(expr.rjust(30), eval(expr)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment