don't you need:

    from __future__ import print_function

for this to work in python2?