On my local machine, I run a python script which contains this line
bashCommand = \"cwm --rdf test.rdf --ntriples > test.nt\" os.system(bashCommand)
Call it with subprocess
import subprocess subprocess.Popen("cwm --rdf test.rdf --ntriples > test.nt")
The error you are getting seems to be because there is no swap module on the server, you should install swap on the server then run the script again