I want to capture the output produced by IPython terminal in a Python terminal. As all the testing takes place using a Python Kernel. I know about the IPython magic function. %%capture Is there a way to use these magic functions as context manager and capture the output, or maybe some other way?
Thanks.