Python 3 compat (prints converted to functions)

Tested with Python 2.7.5 and 3.3.2