Add compatible_print

The fresh code can't run on python3, so I hack the `print` for compatibility.