reportlab: restore 2.4'isms
authorrgbecker
Fri, 26 May 2006 12:29:08 +0000
changeset 2640 3b9f819abb41
parent 2639 9ff3bbcf3282
child 2641 8b8c4ac36198
reportlab: restore 2.4'isms
reportlab/graphics/barcode/__init__.py
reportlab/graphics/barcode/eanbc.py
--- a/reportlab/graphics/barcode/__init__.py	Thu May 25 13:04:56 2006 +0000
+++ b/reportlab/graphics/barcode/__init__.py	Fri May 26 12:29:08 2006 +0000
@@ -35,10 +35,17 @@
 def getCodes():
     """Returns a dict mapping code names to widgets"""
 
-    from widgets import BarcodeI2of5, BarcodeCode128, BarcodeStandard93,\
-                        BarcodeExtended93, BarcodeStandard39, BarcodeExtended39,\
-                        BarcodeMSI, BarcodeCodabar, BarcodeCode11, BarcodeFIM,\
-                        BarcodePOSTNET 
+    from widgets import (BarcodeI2of5,
+                BarcodeCode128,
+                BarcodeStandard93,
+                BarcodeExtended93,
+                BarcodeStandard39,
+                BarcodeExtended39,
+                BarcodeMSI,
+                BarcodeCodabar,
+                BarcodeCode11,
+                BarcodeFIM,
+                BarcodePOSTNET)
 
     #newer codes will typically get their own module
     from eanbc import Ean13BarcodeWidget, Ean8BarcodeWidget
--- a/reportlab/graphics/barcode/eanbc.py	Thu May 25 13:04:56 2006 +0000
+++ b/reportlab/graphics/barcode/eanbc.py	Fri May 26 12:29:08 2006 +0000
@@ -286,12 +286,12 @@
         c = s[7:]
         gAdd(String(x,y,c,fontName=fontName,fontSize=fontSize,fillColor=textColor,textAnchor='middle'))
 
+    @classmethod
     def _checkdigit(cls,num):
         z = ord('0')
         iSum = cls._0csw*sum([(ord(x)-z) for x in num[::2]]) \
                  + cls._1csw*sum([(ord(x)-z) for x in num[1::2]])
         return chr(z+((10-(iSum%10))%10))
-    _checkdigit=classmethod(_checkdigit)
 
 class isEan8String(Validator):
     def test(self,x):