use*_*108 4 python io stdout redirectstandardoutput stringio
我的 python 3 涂鸦是这样的:
import io, sys
sys.stdout = io.StringIO()
# no more responses to python terminal funnily enough
Run Code Online (Sandbox Code Playgroud)
我的问题是如何重新连接,以便当我传入时1+1它会返回2到控制台?
这是在 Windows 7 64 位上运行的 32 位 python 上的 python 解释器中。