Stream tee in Python: saving STDOUT to file while keeping the console alive
Today, I was debugging within the Simics virtual platform debugger when I needed to log my console to file, while still being able to work with it. Usually, I would have done: c:\prompt> [commands to start Simics] > out.txt However, this kills the console since stdout is fully redirected to a file. I quickly coded […]