Python: Fix callbacks for the "special" print hooks