1import sys
2print('Python version you are using')
3print(sys.version)
4print('Informantion')
5print(sys.version_info)
6
7
1def displayhook(value):
2 if value is None:
3 return
4 # Set '_' to None to avoid recursion
5 builtins._ = None
6 text = repr(value)
7 try:
8 sys.stdout.write(text)
9 except UnicodeEncodeError:
10 bytes = text.encode(sys.stdout.encoding, 'backslashreplace')
11 if hasattr(sys.stdout, 'buffer'):
12 sys.stdout.buffer.write(bytes)
13 else:
14 text = bytes.decode(sys.stdout.encoding, 'strict')
15 sys.stdout.write(text)
16 sys.stdout.write("\n")
17 builtins._ = value
18
1if sys.platform.startswith('freebsd'):
2 # FreeBSD-specific code here...
3elif sys.platform.startswith('linux'):
4 # Linux-specific code here...
5elif sys.platform.startswith('aix'):
6 # AIX-specific code here...
7