Py3k fixes
authorStefan Behnel <scoder@users.berlios.de>
Sun, 2 Mar 2008 10:59:40 +0000 (11:59 +0100)
committerStefan Behnel <scoder@users.berlios.de>
Sun, 2 Mar 2008 10:59:40 +0000 (11:59 +0100)
Demos/callback/run_cheese.py
Demos/pyprimes.py

index 65fd431bed96be628748607be5f450e7fa1d64d8..2e5d6cbc4dcde9d230d257f343ccc865b073c139 100644 (file)
@@ -1,7 +1,7 @@
 import cheese
 
 def report_cheese(name):
-    print "Found cheese:", name
+    print("Found cheese: " + name)
 
 cheese.find(report_cheese)
 
index edcce852b613a410670c01c7e968995edd0ff2c5..7c52422446d93ff363229f3d14cea0b7bf1e50f7 100644 (file)
@@ -4,7 +4,7 @@ def primes(kmax):
     n = 2
     while k < kmax:
         i = 0
-        while i < k and n % p[i] <> 0:
+        while i < k and n % p[i] != 0:
             i = i + 1
         if i == k:
             p.append(n)