Replace "print" with "self.stdout.write"

This way, the output can be redirected via call_command