How do you redirect stdout and stderr to two different files using plumbum?

185 Views Asked by At

I'm running a perl script in a pipeline context through plumbum in a Python3 script. I'd like to redirect the stdout to a .stdout file and stderr to a .stderr file.

I tried using the usual >, 2> but it's not supported by plumbum. The .run method gives me a tuple, but I can't find a way to output stdout and stderr without invoking the script twice.

This is the command I'm trying to run.

(perl ["/usr/local/svn/source/update/trunk/utilities/UniprotToGo.pl","3.40.50.12260.uniprot_acc_sorted.txt","--force"]).run("test.stdout","test.stderr",retcode=None)
0

There are 0 best solutions below