tests/test_platypus_preformatted.py
branchpy33
changeset 3800 e8547b00eb59
parent 3794 398ea04239b5
child 3854 88461978a888
--- a/tests/test_platypus_preformatted.py	Tue Nov 19 15:30:37 2013 +0000
+++ b/tests/test_platypus_preformatted.py	Tue Nov 19 16:30:03 2013 +0000
@@ -7,7 +7,6 @@
 setOutDir(__name__)
 import sys, os, random
 from operator import truth
-from types import StringType, ListType
 import unittest
 from reportlab.pdfbase.pdfmetrics import stringWidth
 from reportlab.platypus.paraparser import ParaParser
@@ -100,7 +99,6 @@
 __version__=''' $Id: xpreformatted.py 3866 2011-06-27 13:08:20Z rgbecker $ '''
 __doc__='''A 'rich preformatted text' widget allowing internal markup'''
 
-from types import StringType, ListType
 from reportlab.lib import PyFontify
 from paragraph import Paragraph, cleanBlockQuotedText, _handleBulletWidth, ParaLines, _getFragWords, stringWidth, _sameFrag, getAscentDescent, imgVRange, imgNormV
 from flowables import _dedenter
@@ -112,7 +110,7 @@
         self._setup(text, style, bulletText, frags, cleaner)
 
     def breakLines(self, width):
-        if type(width) != ListType: maxWidths = [width]
+        if isinstance(width,list): maxWidths = [width]
         else: maxWidths = width
         lines = []
         lineno = 0