Have you tried this?
import subprocess
subprocess.Popen(['python', 'myfile.py', '-c', "'USA'", '-g', "'CA'", '-0', "'2011-10-13'", -1, "'2011-10-27'"]).communicate()
You can use this in myfile.pyto verify that what you get from bashmatches what you get from subprocess.Popen(in my case, it matches):
import sys
print sys.argv
source
share