Python 3 syntax compatibility
diff --git a/memdbg.py b/memdbg.py
index e30b68c..324d0fd 100644
--- a/memdbg.py
+++ b/memdbg.py
@@ -31,7 +31,7 @@
 
 def log(s):
     if verbose:
-        print s
+        print(s)
 
 def _backtrace():
     buf = _ffi.new("void*[]", 64)
@@ -75,8 +75,8 @@
 
 
 if _api.CRYPTO_set_mem_functions(malloc, realloc, free):
-    print 'Enabled memory debugging'
+    log('Enabled memory debugging')
     heap = {}
 else:
-    print 'Failed to enable memory debugging'
+    log('Failed to enable memory debugging')
     heap = None