My script uses an external module which prints to the console some information when something happens, I need to capture the moment this new information has been printed, so in other words, I need to access the current console text and check if this information has been printed out.
after searching a bit online I found this:
old_stdout = sys.stdout
sys.stdout = buffer = StringIO()
# Code
buffer.getvalue()
But for some reason this doesn't capture the console outputs of the module I am using, it only captures the print
statements I use, is there a way for me to get the current console text?