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