[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:
parent
5534c15bc5
commit
603e321a37
1 changed files with 4 additions and 0 deletions
|
|
@ -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());
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue