How to duplicate sys.stdout to a log file?
Edit: Since it appears that there’s either no solution, or I’m doing something so non-standard that nobody knows – I’ll revise my question to also ask: What is the best way to accomplish logging when a python app is making a lot of system calls?