[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.
This commit is contained in:
Ray Speth 2015-02-28 00:24:29 +00:00
parent 5534c15bc5
commit 603e321a37

View file

@ -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());