Last active
January 19, 2017 00:25
-
-
Save chekunkov/848c3472d4b0bee69bccd2e77907a590 to your computer and use it in GitHub Desktop.
Revisions
-
chekunkov revised this gist
Jan 9, 2017 . 1 changed file with 3 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -11,10 +11,10 @@ def displayhook_pprint(o): """ if o is None: return if sys.version_info[0] == 2: import __builtin__ as builtins else: import builtins # Set '_' to None to avoid recursion # https://docs.python.org/3/library/sys.html#sys.displayhook builtins._ = None -
chekunkov revised this gist
Jan 8, 2017 . 1 changed file with 3 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -15,8 +15,10 @@ def displayhook_pprint(o): import builtins else: import __builtin__ as builtins # Set '_' to None to avoid recursion # https://docs.python.org/3/library/sys.html#sys.displayhook builtins._ = None pprint.pprint(o) builtins._ = o sys.displayhook = displayhook_pprint -
chekunkov revised this gist
Jan 8, 2017 . 1 changed file with 12 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,13 +1,22 @@ #!/usr/bin/env python import sys import pprint def displayhook_pprint(o): """Display hook powered by pprint. https://www.python.org/dev/peps/pep-0217/ """ if o is None: return if sys.version_info[0] == 3: import builtins else: import __builtin__ as builtins builtins._ = None pprint.pprint(o) builtins._ = o sys.displayhook = displayhook_pprint -
chekunkov created this gist
Jan 8, 2017 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,13 @@ #!/usr/bin/env python import __builtin__ import sys import pprint def displayhook_pprint(o): if o is None: return __builtin__._ = None pprint.pprint(o) __builtin__._ = o sys.displayhook = displayhook_pprint