Use SWIG_Python_AppendOutput instead of a macro.