The analysis of sequencing data (at least in the first steps) is often a matter of starting multiple scripts one after an other.
I found out that to log the stdout and the stderr with python was not that much obivous for me. I struggled quite a bit with the logging module but finally I came with the following.
Using this class in an interactive session of python allows you to log the results (and the errors) of the ‘ls -al’ in a file named ls.log in the /tmp folder.
This is of course just a starting point with a silly example of logging ‘ls -al’ shell command output.
If you really want to use this all you need to do is to replace ‘folderlisting’ method by a few one fitting to the scripts you would like to start and log the results.
It is fairly possible that the code presented is not the usual way to make it (see DISCLAIMER) but at least it has been working for me.