From a05409fd4543127086bb048d6d6015de86e31520 2019-12-16 05:19:28 From: Naveen Honest Raj K Date: 2019-12-16 05:19:28 Subject: [PATCH] removed snip_print fn because unused Signed-off-by: Naveen Honest Raj K --- diff --git a/IPython/core/page.py b/IPython/core/page.py index afdded2..ed16b61 100644 --- a/IPython/core/page.py +++ b/IPython/core/page.py @@ -341,32 +341,3 @@ else: return False else: return True - - -def snip_print(str,width = 75,print_full = 0,header = ''): - """Print a string snipping the midsection to fit in width. - - print_full: mode control: - - - 0: only snip long strings - - 1: send to page() directly. - - 2: snip long strings and ask for full length viewing with page() - - Return 1 if snipping was necessary, 0 otherwise.""" - - if print_full == 1: - page(header+str) - return 0 - - print(header, end=' ') - if len(str) < width: - print(str) - snip = 0 - else: - whalf = int((width -5)/2) - print(str[:whalf] + ' <...> ' + str[-whalf:]) - snip = 1 - if snip and print_full == 2: - if py3compat.input(header+' Snipped. View (y/n)? [N]').lower() == 'y': - page(str) - return snip