summaryrefslogtreecommitdiff
path: root/community-staging/ktoblzcheck/ktoblzcheck-python3.patch
blob: 5bfc532759c661afbd56d662a6b8cc775cd46d66 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
diff -ur ktoblzcheck-1.28/src/python/ktoblzcheck.py ktoblzcheck-1.28.my/src/python/ktoblzcheck.py
--- ktoblzcheck-1.28/src/python/ktoblzcheck.py	2008-08-12 16:48:54.000000000 +0000
+++ ktoblzcheck-1.28.my/src/python/ktoblzcheck.py	2010-09-20 09:08:36.000000000 +0000
@@ -197,35 +197,35 @@
 
 def test():
     a = AccountNumberCheck()
-    print 'Number of Banks:', a.bankCount
-    print 'find 20010020:', a.findBank('20010020')
-    print 'find 20010033:', a.findBank('20010033')
-    print 'check 20070024/9291394:', a.check('20070024','9291394')
-    print 'check 20070024/9291394:', a.check('20070024','9291394023')
-    print
+    print('Number of Banks:', a.bankCount)
+    print('find 20010020:', a.findBank('20010020'))
+    print('find 20010033:', a.findBank('20010033'))
+    print('check 20070024/9291394:', a.check('20070024','9291394'))
+    print('check 20070024/9291394:', a.check('20070024','9291394023'))
+    print()
     ck = IbanCheck()
     if not kto.IbanCheck_selftest(ck):  # not publicly defined
-	print "Self-Test failed!"
+        print("Self-Test failed!")
 	raise SystemExit
     s = " iban fr14 2004 1010 0505 0001 3m02 606"
-    print "test for iban    :", s
+    print("test for iban    :", s)
     iban = Iban(s)
-    print "transmission form:", iban.transmissionForm()
+    print("transmission form:", iban.transmissionForm())
     res = ck.check(iban)
-    print "check result     :", res, "("+IbanCheck.resultText(res)+")"
-    print "printable form   :", iban.printableForm()
-    print
-    print "expect bad checksum:"
+    print("check result     :", res, "("+IbanCheck.resultText(res)+")")
+    print("printable form   :", iban.printableForm())
+    print()
+    print("expect bad checksum:")
     s = "FR1420041010050500013X02606"
     res = ck.check(s)
-    print s + ":", res, "("+IbanCheck.resultText(res)+")"
-    print
+    print(s + ":", res, "("+IbanCheck.resultText(res)+")")
+    print()
     s = "IBAN DE66 2007 0024 0929 1394 00"
-    print s
+    print(s)
     s = Iban(s).transmissionForm()
     start, end = ck.bic_position(s)
-    print "prefix, checksum, BIC, account:"
-    print ', '.join((s[:2], s[2:4], s[start:end], s[end:].lstrip('0')))
+    print("prefix, checksum, BIC, account:")
+    print(', '.join((s[:2], s[2:4], s[start:end], s[end:].lstrip('0'))))
 
 
 if __name__ == '__main__':