I want to redirect the output of my jar in a file with python I have tried the following but it didn't work out
import sys
import subprocess
cmdargs = sys.argv
fname = str(cmdargs[1])
input = '../res/test/'+fname
output = '../res/res/'+fname
subprocess.Popen(['java', '-jar', '../res/chemTagger2.jar',input,'>',output])
the output is print in the console