Commits

Boris FELD committed fd15575

Add support for python3

Comments (0)

Files changed (1)

 from ast import *
 
 def new_assert(assertion, locals, globals, message=None):
-    print "Called with", assertion, message
+    print("Called with %s %s" % (assertion, message))
     locals, globals = locals.copy(), globals.copy()
     globals.pop('__builtins__')
 
         mod.__file__ = "%s" % fullpath
         mod.__loader__ = self
 
-        exec compile(code, fullpath, 'exec') in mod.__dict__
+        exec(compile(code, fullpath, 'exec')) in mod.__dict__
         return mod
 
 sys.meta_path.append(ImportHook())