aboutsummaryrefslogtreecommitdiffstats
path: root/library/python/runtime_py3/test/subinterpreter/stdout_interceptor.h
blob: a1e219953f04855832136c1c3cba24f440a7fbb7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#pragma once

#include <Python.h>

class IOutputStream;

class TPyStdoutInterceptor {
public:
    TPyStdoutInterceptor(IOutputStream& redirectionStream) noexcept;
    ~TPyStdoutInterceptor() noexcept;

    static bool SetupInterceptionSupport() noexcept;

private:
    PyObject* RealStdout_;
};