| 14 | |
| 15 | template<StreamType T> |
| 16 | void PythonStreamRedirector<T>::write( const std::string& text ) |
| 17 | { |
| 18 | ++NumWritten<T>::counter; |
| 19 | MR::UnifiedPythonStream::get() << text; |
| 20 | if constexpr ( T == Stdout ) |
| 21 | std::cout << text; |
| 22 | else |
| 23 | std::cerr << text; |
| 24 | } |
| 25 | |
| 26 | template<StreamType T> |
| 27 | void PythonStreamRedirector<T>::flush() |