On my local machine, I run a python script which contains this line
bashCommand = \"cwm --rdf test.rdf --ntriples > test.nt\" os.system(bashCommand)
It is possible you use the bash program, with the parameter -c for execute the commands:
bashCommand = "cwm --rdf test.rdf --ntriples > test.nt" output = subprocess.check_output(['bash','-c', bashCommand])