I'm trying to log the terminal display produced by a script which contains a Scipy optimization routine. I've tried three different ways, all with disappointing results.
open() and cmd-prompt redirection (">") did not log the warnings nor the per-iteration information I would like to keep track of; it only logged the parameter solutions.
logging.basicConfig() produced a blank file.
If possible, I would like to be able to log the exact terminal display of a script file. I've begun looking into using the logging module, but it seems pretty complex for what I would think is a very basic task (I'm coming from a Matlab background).
Environment:
. Python 2.7.3
. Operating Systems: Windows Vista and XP