From 603e321a3798b855e814af724a5e5793947b1c40 Mon Sep 17 00:00:00 2001 From: Ray Speth Date: Sat, 28 Feb 2015 00:24:29 +0000 Subject: [PATCH] [Cython] Fix treatment of writelogendl() Both writelog and writelogendl should be passed through PySys_WriteStdout to ensure that they are printed in the correct order. Problems with this were identified in the 1D solver log when using Python 3. --- include/cantera/cython/wrappers.h | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/include/cantera/cython/wrappers.h b/include/cantera/cython/wrappers.h index f20867365..4025d8c07 100644 --- a/include/cantera/cython/wrappers.h +++ b/include/cantera/cython/wrappers.h @@ -27,6 +27,10 @@ public: } } + virtual void writeendl() { + PySys_WriteStdout("%s", "\n"); + } + virtual void error(const std::string& msg) { std::string err = "raise Exception('''"+msg+"''')"; PyRun_SimpleString(err.c_str());