pyramid_cubicweb/profile.py
changeset 11630 1400aee10df4
parent 11537 caf268942436
--- a/pyramid_cubicweb/profile.py	Tue Jun 28 11:03:20 2016 +0200
+++ b/pyramid_cubicweb/profile.py	Thu Jul 07 14:30:32 2016 +0200
@@ -1,8 +1,11 @@
 """ Tools for profiling.
 
 See :ref:`profiling`."""
+from __future__ import print_function
+
 import cProfile
 import itertools
+
 from pyramid.view import view_config
 
 
@@ -53,7 +56,7 @@
         finally:
             profile.disable()
             if not counter.next() % dump_every:
-                print "Dump profile stats to %s" % filename
+                print("Dump profile stats to %s" % filename)
                 profile.create_stats()
                 profile.dump_stats(filename)