A simple way to duplicate stdout and stderr to a file while still displaying it during the process
pip install https://github.com/Noizrom/DupIO/archive/refs/tags/duplicate_io-v0.3.0.tar.gzfrom duplicate_io import Forkstdout , ForkstderrForkstdout("file-to-fork-stdout.txt" , "a+")
Forkstderr("file-to-fork-stderr.txt" , "a+")