##// END OF EJS Templates
Further removal of string module from core.
Thomas Kluyver -
Show More
@@ -22,7 +22,6 b' import StringIO'
22 22 import inspect
23 23 import linecache
24 24 import os
25 import string
26 25 import sys
27 26 import types
28 27 from collections import namedtuple
@@ -450,7 +449,7 b' class Inspector:'
450 449 if not detail_level and len(ostr)>string_max:
451 450 ostr = ostr[:shalf] + ' <...> ' + ostr[-shalf:]
452 451 ostr = ("\n" + " " * len(str_head.expandtabs())).\
453 join(map(string.strip,ostr.split("\n")))
452 join(q.strip() for q in ostr.split("\n"))
454 453 if ostr.find('\n') > -1:
455 454 # Print multi-line strings starting at the next line.
456 455 str_sep = '\n'
@@ -675,7 +674,7 b' class Inspector:'
675 674 if not detail_level and len(ostr)>string_max:
676 675 ostr = ostr[:shalf] + ' <...> ' + ostr[-shalf:]
677 676 ostr = ("\n" + " " * len(str_head.expandtabs())).\
678 join(map(string.strip,ostr.split("\n")))
677 join(q.strip() for q in ostr.split("\n"))
679 678 if ostr.find('\n') > -1:
680 679 # Print multi-line strings starting at the next line.
681 680 str_sep = '\n'
@@ -77,7 +77,6 b' import linecache'
77 77 import os
78 78 import pydoc
79 79 import re
80 import string
81 80 import sys
82 81 import time
83 82 import tokenize
@@ -707,7 +706,7 b' class VerboseTB(TBTools):'
707 706
708 707 if self.long_header:
709 708 # Header with the exception type, python version, and date
710 pyver = 'Python ' + string.split(sys.version)[0] + ': ' + sys.executable
709 pyver = 'Python ' + sys.version.split()[0] + ': ' + sys.executable
711 710 date = time.ctime(time.time())
712 711
713 712 head = '%s%s%s\n%s%s%s\n%s' % (Colors.topline, '-'*75, ColorsNormal,
General Comments 0
You need to be logged in to leave comments. Login now