[issue19103] Use pprint in displayhook

2013-09-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: > (in the patch, import of sys and pprint should be done once at module level > and not repeated with every line of interactive output). See a comment at the start of the Lib/_sitebuiltins.py file. Yes, importing sys in the function is redundant. > For inst

[issue19103] Use pprint in displayhook

2013-09-28 Thread Terry J. Reedy
Changes by Terry J. Reedy : -- nosy: +rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.p

[issue19103] Use pprint in displayhook

2013-09-28 Thread Terry J. Reedy
Terry J. Reedy added the comment: (in the patch, import of sys and pprint should be done once at module level and not repeated with every line of interactive output). > pprint.pprint() produces more human readable output than print(repr()) which > is used in sys.displayhook() Only sometimes,

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- dependencies: +Use backslashreplace in pprint, pprint produces invalid output for long strings ___ Python tracker ___ __

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In second patch the COLUMNS environment variable is used to determine pprint's width. -- Added file: http://bugs.python.org/file31885/displayhook_pprint_2.patch ___ Python tracker

[issue19103] Use pprint in displayhook

2013-09-27 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: pprint.pprint() produces more human readable output than print(repr()) which is used in sys.displayhook(). The proposed patch changes sys.displayhook in site.py. You still can access original displayhook as sys.__displayhook__. -- files: displayhoo